add comments on Scan func

This commit is contained in:
huija 2020-06-23 12:32:26 +08:00
parent f2bae3e367
commit f70fd5babf
1 changed files with 1 additions and 0 deletions

View File

@ -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()