Skip to content

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

@pushrax

Description

@pushrax

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions