Closed davyzhang closed 1 year ago
Your program exits before the event functions are even allowed to start. From the OnEviction
docs: The function is executed on a separate goroutine and does not block the flow of the cache manager.
Here's how it should look like to be able to work: https://go.dev/play/p/Y7sOej0cy_1
https://go.dev/play/p/rmBTONl0npV
The example program doesn't compile
I changed it a little, but nothing happens