Is ristretto has callback function?

some callback function can setup like callback fired when the oldest entry is removed because of its expiration time or no space left for the new entry, or because delete was called.

tks for answer

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.

thank you very much!! it is helpful !! :grinning_face_with_smiling_eyes: