go-cache icon indicating copy to clipboard operation
go-cache copied to clipboard

OnEvicted is not called for every expired value

Open VovkoO opened this issue 1 year ago • 1 comments

When I try to get and overwrite a value that has already expired but has not yet been deleted from the cache, I get nil, overwrite it with fresh data, and the old data will not even get into the OnEvicted function

VovkoO avatar Apr 02 '24 14:04 VovkoO

When I try to get and overwrite a value that has already expired but has not yet been deleted from the cache, I get nil, overwrite it with fresh data, and the old data will not even get into the OnEvicted function

Hi @VovkoO you can use this implementation https://github.com/pzentenoe/go-cache Regards

pzentenoe avatar Jul 03 '24 07:07 pzentenoe