From f70fd5babfcb206fb5aab3d2e771052345337a7b Mon Sep 17 00:00:00 2001 From: huija <1150555483@qq.com> Date: Tue, 23 Jun 2020 12:32:26 +0800 Subject: [PATCH] add comments on Scan func --- cache/redis/redis.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cache/redis/redis.go b/cache/redis/redis.go index a1ea7b49..7a14b012 100644 --- a/cache/redis/redis.go +++ b/cache/redis/redis.go @@ -151,6 +151,7 @@ func (rc *Cache) ClearAll() error { return err } +// Scan scan all keys matching the pattern. a better choice than `keys` func (rc *Cache) Scan(pattern string) (keys []string, err error) { c := rc.p.Get() defer c.Close()