ristretto icon indicating copy to clipboard operation
ristretto copied to clipboard

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

Open yusuf-kh opened this issue 11 months ago • 1 comments

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 avatar Sep 07 '23 08:09 yusuf-kh

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

mangalaman93 avatar Sep 07 '23 08:09 mangalaman93

This issue has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open.

github-actions[bot] avatar Jul 13 '24 01:07 github-actions[bot]