Reputation: 2104
I would like to understand, how expired entries are removed when using the Caffeine Cache with the expireAfterWrite() parameter. Is the removal done upon calling the getIfPresent() and/or .size() method?
If yes, how can we make sure we dont run into issues when there many inserts but a few get() calls against the cache? I would like not to have to call the size() method in a scheduled method.
Upvotes: 0
Views: 199