Example #1
0
func SetAction(req *memcachep.MCRequest, res *memcachep.MCResponse) {
	res.Fatal = false
	data[req.Key] = string(req.Value)
	res.Status = memcachep.STORED
}
Example #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))
}
Example #3
0
func GetAction(req *memcachep.MCRequest, res *memcachep.MCResponse) {
	res.Fatal = false
	res.Value = []byte(data[req.Key])
}