patrickmn / go-cache

An in-memory key:value store/cache (similar to Memcached) library for Go, suitable for single-machine applications.
https://patrickmn.com/projects/go-cache/
MIT License
8.16k stars 874 forks source link

I am only interested in timeout entries,but not deleted entrie on the callback function. #112

Closed thinkgos closed 4 years ago

thinkgos commented 5 years ago

recommended to add a parameter on callback function. like func (c Cache) OnEvicted(f func(action int, key string,value interface{}))

thinkgos commented 5 years ago

or maybe add a function like OnDeleted{func(key string,value interface{})). this may not broken api