The EhCache documentation says:
If you implement and register a CacheEventListener to receive that an element is expired, you can see the event is fired when you try to get an expired element, but not after the 'timeToIdleSeconds'.
Is it possible to force removing the expired element after it is expired? Because in my case after this time no one will try to get it again.
Thank you.
I've done it with the following code:
cache.evictExpiredElements();
cache.flush();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With