Reputation: 1102
Is it possible to set caffeine cache size limited to x MB ?
If this is not possible, is there any performance reason for not doing it [For my understanding].
I checked with weighter, . As per my understanding weight is calculated based on number of time key was accessed. If i understand weight wrongly please guide me with right link
My use case is to set cache size to x-MB and evict once we reach x-MB
Reference i used:
https://github.com/ben-manes/caffeine/wiki/Eviction
https://www.tabnine.com/code/java/methods/com.github.benmanes.caffeine.cache.Caffeine/maximumWeight
weight based eviction : https://www.baeldung.com/java-caching-caffeine
Thanks
Jk
Upvotes: 0
Views: 2287