1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 08:50:56 +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
}
// 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()