Feature request: PostEvictionCallback
ruslan528 opened this issue · 2 comments
ruslan528 commented
In common scenarios developer want to log eviction from cache. This is an important feature to improve observability of application. I propose to add new optional parameter to constructor - delegate (see Microsoft.Extensions.Caching.Memory.PostEvictionDelegate).
alex-jitbit commented
Thanks!
Do you mean one call back for every item, or cache-global?
ruslan528 commented
I think that "cache-global" implementation will be enough. That universal "PostEvictionDelegate" will receive evicted item - so we will have ability to log his key and value.