In my ehcache configuration I see these:
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
What does that mean effectively?
Documentation mentions that timeToLiveSeconds="0" means these checks will not be made. So this means objects will be eternal, even if "eternal" is set to false?
Open-source Ehcache offers a limited version of persistence, as noted in this document. Fast Restart provides enterprise-ready crash resilience with an option to store a fully consistent copy of the cache on the local disk at all times.
In Ehcache, the MemoryStore may be limited in size (see How to Size Caches for more information). When the store gets full, elements are evicted.
Ehcache can assist you with reducing the likelihood that stale data is used by your application by expiring cache entries after some amount of configured time. Once expired, the entry is automatically removed from the cache.
If you look at CacheConfiguration.java:826
(my version of Ehcache is 2.6.5), you will see the following:
if (eternal) {
setTimeToIdleSeconds(0);
setTimeToLiveSeconds(0);
}
So it's essentially the same thing.
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