Ehcache 2.10.6 | Product Documentation | Ehcache Configuration Guide | Managing Data Life | How Configuration Affects Element Flushing and Eviction
 
How Configuration Affects Element Flushing and Eviction
The following example shows a cache with certain expiration settings:
<cache name="myCache"
eternal="false" timeToIdleSeconds="3600"
timeToLiveSeconds="0" memoryStoreEvictionPolicy="LFU">
</cache>
Note the following about the myCache configuration:
*If a client accesses an entry in myCache that has been idle for more than an hour (timeToIdleSeconds), that element is evicted.
*If an entry expires but is not accessed, and no resource constraints force eviction, then the expired entry remains in place until a periodic evictor removes it.
*Entries in myCache can live forever if accessed at least once per 60 minutes (timeToLiveSeconds). However, unexpired entries may still be flushed based on other limitations. For details, see Sizing Storage Tiers.

Copyright © 2010-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.