1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 21:11:29 +00:00

add comments on Scan func

This commit is contained in:
huija 2020-06-23 12:32:26 +08:00
parent f2bae3e367
commit f70fd5babf

View File

@ -151,6 +151,7 @@ func (rc *Cache) ClearAll() error {
return err return err
} }
// Scan scan all keys matching the pattern. a better choice than `keys`
func (rc *Cache) Scan(pattern string) (keys []string, err error) { func (rc *Cache) Scan(pattern string) (keys []string, err error) {
c := rc.p.Get() c := rc.p.Get()
defer c.Close() defer c.Close()