Add onEvict method
Closed this issue · 2 comments
seiflotfy commented
Would be nice to have an onEvict callback (as a parameter to the constructor) that is called when an item is evicted from cache
josephlewis42 commented
I think that's an excellent idea!
Do you think you'd want it to be executed in the same thread or a separate goroutine?
seiflotfy commented
oh wow did not think of the separate goroutine possibility. But it does sound like a great great idea. But for starters maybe same thread. And if it works nicely update to goroutine?