Commit 48ec7f73 authored by liuchun's avatar liuchun

fix GetMulti bug

parent 292d8f2c
......@@ -50,8 +50,9 @@ func (rc *Cache) GetMulti(keys []string) []interface{} {
}
}
res, err := rc.conn.Do("multi_get", keys)
res_size := len(res)
if err == nil {
for i := 1; i < size*2; i += 2 {
for i := 1; i < res_size; i += 2 {
values = append(values, string(res[i+1]))
}
return values
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment