You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. It does not have to be run_pending_tasks method, but you need to call some of the cache methods such as get, get_with, insert, or remove to drive eviction_listener.
but i want the eviction_listener() to be called exactly at the time of eviction, not some time later,
can you please help me to understand what should i do?
You can spawn a thread and make it to call run_pending_tasks with some interval (e.g. 0.1 secs). If you need some code samples, I could write one for you.
The text was updated successfully, but these errors were encountered:
Hi! would it be good to add in the public doc about this behavior when it's described how to create an eviction listener? I feel it'd be good to say explicitly that the listener is not called automatically but it's linked to some cache operations, and perhaps bring the section in https://github.com/moka-rs/moka/blob/main/MIGRATION-GUIDE.md#the-maintenance-tasks to the pub doc as well?
Split from #349 (comment)
The text was updated successfully, but these errors were encountered: