4 Replies Latest reply on Jan 3, 2011 2:07 PM by Dave Marion

    Please clarify eviction rules

    Dave Marion Newbie

      I was under some assumptions about eviction based on some of the documentation that I read. I believe these are false based on the testing I have done and looking through the source code, but just want some clarification please....




      1. Eviction takes into account the amount of free memory in the JVM and starts evicting entries when some threshold has been reached.

      2. Eviction will occur even if you specify -1 in the configuration file for maxEntries.


      It appears that a cache cannot be created where I want to create a cache (with some unknown up front number of entries) and use eviction to save me from OOM errors. Further, it only appears that entries that have been expired are evicted. Non-expired entries are not evicted based.


      Question 1: Should I enter an enhancement request where JVM free memory is taken into account to begin evicting entries from the cache? Or is this already on the roadmap?


      Question 2: Related to eviction and a cache store, I did some testing and it does not appear that entries in the cache (when passivation is true) are flushed to the cache store when the cache is being shutdown. Please confirm as I might enter a 2nd enhancement request for this...