JBoss.org Community Documentation

Chapter 9. Eviction Policies

9.1. Configuring Eviction Policies
9.1.1. Basic Configuration
9.1.2. Eviction Regions
9.1.3. Resident Nodes
9.1.4. Programmatic Configuration
9.2. Shipped Eviction Policies
9.2.1. LRUPolicy - Least Recently Used
9.2.2. FIFOPolicy - First In, First Out
9.2.3. MRUPolicy - Most Recently Used
9.2.4. LFUPolicy - Least Frequently Used
9.2.5. ExpirationPolicy
9.2.6. ElementSizePolicy - Eviction based on number of key/value pairs in a node
9.3. Writing Your Own Eviction Policies
9.3.1. Eviction Policy Plugin Design
9.3.2. Interfaces to implement

Eviction policies control JBoss Cache's memory management by managing how many nodes are allowed to be stored in memory and their life spans. Memory constraints on servers mean cache cannot grow indefinitely, so policies need to be in place to restrict the size of the cache. Eviction policies are most often used alongside cache loaders cache loaders .