This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
Hi all, I am new to ehcache. I read that timeToLiveSeconds is the total time an entry stays in a cache region. timeToIdleSeconds is total time an entry should stay in cache if it is not referenced.
Suppose if timeToLiveSeconds is 600. Does it means after 10 minutes it will be removed from the cache? On the same object I have timeToIdleSeconds is 0. It means it is never evicted from the memory. Then according to timeToLiveSeconds property after 10 minutes it will be removed from cache. Will it be transferred to some kind of secondary cache from main cache?
I am unable to understand these properties. Can anyone please shed some light?
The maximum number of seconds an element can exist in the cache regardless of use. The element expires at this limit and will no longer be returned from the cache. The default value is 0, which means no TTL eviction takes place (infinite lifetime).
The maximum number of seconds an element can exist in the cache without being accessed. The element expires at this limit and will no longer be returned from the cache. The default value is 0, which means no TTI eviction takes place (infinite lifetime).
In fact, timeToLive of X, your element is removed from your cache after X seconds in all case and timeToIdle, your element is extended of X second if there is an access on your element before the X seconds of your first call.