vendor: Mega update all dependencies

This commit is contained in:
Jakob Borg
2017-04-05 16:21:57 +02:00
parent 49c1527724
commit 36b8833441
1358 changed files with 55045 additions and 798287 deletions
+12
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
}