-
Notifications
You must be signed in to change notification settings - Fork 588
Open
Labels
Description
Hi, at my company, we've encountered some issues connected to our cache invalidation logic.
For each cache entry that should be invalidated
- we iterate over the cache entry set, which leads to the value to be deserialized as well
- remove every cache entry, whose key matches the key that should be invalidated
We refactor our implementation that
- the keys that should be invalidated are gathered beforehand
- get invalidated using removeAll instead of remove
Unfortunately the performance appears to be unchanged.
We then started checking the ehcache code base and realized that both operations (remove and removeAll) also deserialize the cache entry's value everytime either operation is called.
- Are our observations correct? Doesn't it matter - performance wise, wether one iterates over the cache entries himself and removes them via cache.remove() vs gathering all keys beforehand and removing them via cache.removeAll()
- Is there a way to invalidate cache entries without deserializing the cache entry's value?
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Unprioritized