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

[QUESTION]: Differentiate between TTL and cost based eviction #316

Open
George-Stroe opened this issue Nov 22, 2022 · 0 comments
Open

[QUESTION]: Differentiate between TTL and cost based eviction #316

George-Stroe opened this issue Nov 22, 2022 · 0 comments
Labels
kind/question Something requiring a response.

Comments

@George-Stroe
Copy link

George-Stroe commented Nov 22, 2022

Question.

Is there a way to differentiate between TTL and cost based evictions? The &Item returned from the onEvict callback has only the Key, Conflict, Value and Cost fields populated, making it impossible to identify what triggered the eviction.

If not, is there a plan for implementing this feature?
A possible solution would be to set the Item.Expiration when evicting the item, so that the cost based eviction would still have some time left.

@George-Stroe George-Stroe added the kind/question Something requiring a response. label Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Something requiring a response.
Projects
None yet
Development

No branches or pull requests

1 participant