quick-cache
quick-cache copied to clipboard
Indicate if an eviction is from hot or cold to Lifecycle eviction functions
I'm using Lifecycle to emit entry age metrics, it would be nice to distinguish between cold evictions and hot evictions so we can tag the metrics separately and more clearly see how the cache is performing.
I'm open to making a patch for this. For backwards compatibility it make sense to add provided methods to the Lifecycle trait with the new signature, and have them just call on_evict/before_evict?