Update go dependencies

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-01-26 10:24:11 -03:00
parent 2f8cbeb8fa
commit 23e7565ebc
396 changed files with 57233 additions and 47523 deletions

View file

@ -119,3 +119,15 @@ func (c *Cache) Len() int {
}
return c.ll.Len()
}
// Clear purges all stored items from the cache.
func (c *Cache) Clear() {
if c.OnEvicted != nil {
for _, e := range c.cache {
kv := e.Value.(*entry)
c.OnEvicted(kv.key, kv.value)
}
}
c.ll = nil
c.cache = nil
}