josephlewis42/multicache

Add onEvict method

Closed this issue · 2 comments

Would be nice to have an onEvict callback (as a parameter to the constructor) that is called when an item is evicted from cache

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?

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?