go-cache icon indicating copy to clipboard operation
go-cache copied to clipboard

Call onEvicted on flush

Open codesoap opened this issue 3 years ago • 0 comments

The documentation of Flush states, that it deletes all items from the cache. When calling Delete, onEvicted is run. Combining these two pieces of knowledge I expected, that onEvicted would be called for all items, when calling Flush, but I had to learn, that this assumption is incorrect.

Was this a deliberate design decision, or would you consider changing the behavior?

codesoap avatar Apr 25 '22 19:04 codesoap