Changed manual map clearing with a built-in clear method in lrucache
This commit is contained in:
parent
83f0d33374
commit
6e6c742228
1 changed files with 1 additions and 3 deletions
|
@ -58,9 +58,7 @@ func (c *lrucache) Range(f func(key, value int) bool) {
|
|||
}
|
||||
|
||||
func (c *lrucache) Clear() {
|
||||
for k := range c.data {
|
||||
delete(c.data, k)
|
||||
}
|
||||
clear(c.data)
|
||||
c.recentEntries.Init()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue