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

Delete from the cache on Get if the item expired (to trigger onEvicted)

Open fdurand opened this issue 8 years ago • 2 comments

When we Get from the cache and if the item expired then Delete it to be sure that onEvicted is triggered.

fdurand avatar Jan 03 '18 14:01 fdurand

This will strongly affect on Get operation performance, because mutex will be locked for RW-access (another concurrent read operations will be also locked). Nevertheless, janitor will also lock cache while deleting other expired items.

aapolkovsky avatar Apr 07 '18 20:04 aapolkovsky

Any updates on this PR?

ekinanp avatar Mar 09 '19 07:03 ekinanp