Given a Guava cache created with the code below is there a maximum cache size if one is not set?
LoadingCache<String, String> loadingCache = CacheBuilder.newBuilder().build(new CacheLoader<String, String>() {
@Override
public String load(String key) throws Exception
{
return key.toUpperCase();
}
});
In my case I really want a cache with no upper bound in size. I am using the cache to store permissions for logged in users and will evict items from the cache on user logout or session expiry.
The default cache is unbounded: as the javadoc for CacheBuilder explains
These features are all optional
and
By default cache instances created by CacheBuilder will not perform any type of eviction.
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