We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9441b1 commit ac0fcefCopy full SHA for ac0fcef
cache.go
@@ -853,8 +853,8 @@ func (c *cache) DeleteExpired() {
853
}
854
855
// Sets an (optional) function that is called with the key and value when an
856
-// item is evicted from the cache. (Including when it is deleted manually.)
857
-// Set to nil to disable.
+// item is evicted from the cache. (Including when it is deleted manually, but
+// not when it is overwritten.) Set to nil to disable.
858
func (c *cache) OnEvicted(f func(string, interface{})) {
859
c.mu.Lock()
860
defer c.mu.Unlock()
0 commit comments