[jboss-user] [JBossCache] - LRU Eviction Policy is clearing the entire cache after MaxAg

fatefree do-not-reply at jboss.com
Wed Feb 20 07:20:07 EST 2008


We have a cache region that holds a few thousand dynamic elements for a specified timeout, in a distributed environment. The code for the eviction policy looks like this:


  | <attribute name="EvictionPolicyConfig">
  | 			<config>
  | 				<attribute name="wakeUpIntervalSeconds">5</attribute>
  | 				<!-- This defaults to 200000 if not specified -->
  | 				<attribute name="eventQueueSize">200000</attribute>
  | 				<attribute name="policyClass">
  | 					org.jboss.cache.eviction.LRUPolicy
  | 				</attribute>
  | 
  | 				<region name="/seamless/qb">
  | 					<attribute name="maxNodes">0</attribute>
  | 					<attribute name="maxAgeSeconds">300</attribute>
  | 					<attribute name="timeToLiveSeconds">0</attribute>
  | 				</region>
  | 			</config>
  | 		</attribute>
  | 

Unfortunately, we expected that individual elements would expire after the time, but instead it seems the entire region is dropped once the timeout occurs. Originally we had the timeToLiveSeconds with the same timeout and I thought that was why the region was clearing. But after setting it to 0, the same situation happens where the entire region is cleared after 300 seconds.

How can I specify that an individual element in cache can live 300 seconds, and only those that expire are removed?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130722#4130722

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130722



More information about the jboss-user mailing list