Beispiel #1
0
func SetAction(req *memcachep.MCRequest, res *memcachep.MCResponse) {
	res.Fatal = false
	data[req.Key] = string(req.Value)
	res.Status = memcachep.STORED
}
Beispiel #2
0
func GetAction(req *memcachep.MCRequest, res *memcachep.MCResponse) {
	res.Fatal = false
	key := req.Key
	content := scanfile.MemScan(mf, &key)
	res.Value = []byte(string(content))
}
Beispiel #3
0
func GetAction(req *memcachep.MCRequest, res *memcachep.MCResponse) {
	res.Fatal = false
	res.Value = []byte(data[req.Key])
}