Skip to content

OnEvictCallback called for non-evictions #36

@costela

Description

@costela

Currently, the OnEvictCallback callback is called for evictions - as expected - but also for expirations (based on TTL) and manual removals.

Further, the current OnEvictCallback signature does not allow differentiate which of these cases happened.

I propose making a breaking change and either:

  • adding separate callbacks
  • adding a "cause" parameter to OnEvictCallback

Any of these seem acceptable? If yes, I'd cook up a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions