Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicate if an eviction is from hot or cold to Lifecycle eviction functions #39

Open
pushrax opened this issue Jul 24, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@pushrax
Copy link
Contributor

pushrax commented Jul 24, 2024

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?

@arthurprs
Copy link
Owner

That makes sense. Although the hit ratio is still the most representative metric.

I'd accept such a change, barring any surprises in terms of invasiveness.

@arthurprs arthurprs added the enhancement New feature or request label Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants