func gets(req *proto.MCRequest, cache *cache.Cache) *proto.MCResponse { value, found := cache.Get(req.Key) res := proto.NewResFull(req.Opcode, proto.SUCCESS, req.Key, req.Flags, found) if found == false { res.Status = proto.END } else { valueb := value.([]byte) res.Value = make([]byte, len(valueb)) copy(res.Value, valueb) } return res }