cache.go
func (c *cache) OnEvicted(f func(string, interface{})) {
	c.mu.Lock()
	c.onEvicted = f
	c.mu.Unlock()
}
func (c *cache) OnEvicted(f func(string, interface{})) {
	c.mu.Lock()
	c.onEvicted = f
	c.mu.Unlock()
}
func ( c * cache ) OnEvicted ( f func ( string , interface { } ) ) { c . mu . Lock ( ) c . onEvicted = f c . mu . Unlock ( ) }
// Sets an (optional) function that is called with the key and value when an
// item is evicted from the cache. (Including when it is deleted manually, but
// not when it is overwritten.) Set to nil to disable.
Sets an ( optional ) function that is called with the key and value when an item is evicted from the cache . ( Including when it is deleted manually but not when it is overwritten . ) Set to nil to disable .