EntryRemovedListener
typealias EntryRemovedListener<K, V> = (evicted: Boolean, key: K, oldValue: V, newValue: V?) -> Unit
A listener that is triggered when a cache entry is removed.
This is triggered when the entry represented by the key
and oldValue
is removed for any reason. If the removal was a result of reaching the max size of the cache, evicted
is true, otherwise its value is false. If the entry was removed as a result of replacing it by one of the put operations, the new value is passed as newValue
, otherwise, newValue
is null.