Ehcache 2.10.5 | Product Documentation | Ehcache Developer Guide | Cache Eviction Algorithms | About Cache Eviction Algorithms
 
About Cache Eviction Algorithms
A cache eviction algorithm is a way of deciding which element to evict when the cache is full. In Ehcache , the memory store and the off-heap store might be limited in size. When these stores get full, elements are evicted. The eviction algorithms determine which elements are evicted. The default algorithm is Least Recently Used (LRU).
What happens on eviction depends on the cache configuration. If a disk store is configured, the evicted element is flushed to disk; otherwise it is removed. The disk store size by default is unbounded. But a maximum size can be set as described in "Sizing the Storage Tiers" in the Configuration Guide forEhcache . If the disk store is full, then adding an element causes an existing element to be evicted.
Note: The disk store eviction algorithm is not configurable. It uses LFU.

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.
Innovation Release