Is ristretto has callback function?

Hi @staticLin,
Ristretto has a OnEvict() function that will be called on every automatic eviction. You can pass it into the config object. I do not think this gets called when you call Del(key), so you would have to keep track of that yourself.