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

[Non-hashed key values in Item]: onEvict should send the non hashed key values #356

Open
yusuf-kh opened this issue Sep 7, 2023 · 1 comment
Labels
kind/feature Something completely new we should consider.

Comments

@yusuf-kh
Copy link

yusuf-kh commented Sep 7, 2023

Have you tried Ristretto before this proposal? and did not find anything similar?

Yes

What you wanted to do.

I want to know the value of the actual key in onEvict hook. However, after storing a key-value pair in ristretto cache, the onEvict method only returns the key's hash, and not its actual value.

Moreover, I do know I can provide my own hash algorithm, but I want to keep using ristretto's default hashing algorithm. Unfortunately, the Hash algorithm isn't a public method, so I can't use that.

What you actually did.

No response

Why wasn't it great, with examples.

No response

Additional information.

No response

@yusuf-kh yusuf-kh added the kind/feature Something completely new we should consider. label Sep 7, 2023
@mangalaman93
Copy link
Contributor

We do not store the key in ristretto, if you care about the key, you could store it in the value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Something completely new we should consider.
Projects
None yet
Development

No branches or pull requests

2 participants