Eviction vs Expiration
Environment
- Jboss Data Grid (JDG) 6.x
Issue
What is the difference between Eviction and Expiration?
Resolution
For eviction when a user thread adds an entry to the cache if the cache size is over the defined limit , an old entry will be removed.In contrast expiration does have a dedicated thread that handles expired entries.
If you are referring to "time to live for a cache entry" then what you need is expiry, which is intended for a per-entry approach.
The eviction is feature is intended to control the total size of the cache.
Here is the relevant section of the docs :
https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Data_Grid/6.4/html/Administration_and_Configuration_Guide/chap-Set_Up_Expiration.html
Section 4.5 and onwards show examples of expiration configuration.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
