golang-lru
golang-lru copied to clipboard
onEvict callback for ARC
Hi, I would like to say thanks for this project guys.
Is there any plans to add onEvict callback to ARC cache too? Actually, it's pretty useful when you work with sync.Pool as well.
+1 here
Also +1 and if that possible onEvict for TwoQueueCache
any news from devs? or package is drop down and not needed for hashicorp?
I had a need for this same functionality and added support to it in https://github.com/bluele/gcache , FYI.
Thanks, i'm switch package =)
@sean- could have added it here instead :-)
Heh. I started with this LRU implementation and moved to the other because it had some of the primitives I immediately needed.
https://github.com/joyent/pg_prefaulter/blob/master/agent/fhcache/cache.go#L61-L95
I've added a draft PR for the evict functionality. #48
Feedback is welcome.