From 48ec7f736e974c35c03889b2f20547b5410d3105 Mon Sep 17 00:00:00 2001 From: liuchun Date: Sun, 6 Mar 2016 14:46:13 +0800 Subject: [PATCH] fix GetMulti bug --- cache/ssdb/ssdb.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cache/ssdb/ssdb.go b/cache/ssdb/ssdb.go index 5a73aebb..d329149c 100644 --- a/cache/ssdb/ssdb.go +++ b/cache/ssdb/ssdb.go @@ -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