go-cache
go-cache copied to clipboard
Delete from the cache on Get if the item expired (to trigger onEvicted)
When we Get from the cache and if the item expired then Delete it to be sure that onEvicted is triggered.
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.
Any updates on this PR?