1 Reply Latest reply on Apr 14, 2010 6:03 AM by Galder Zamarreño

    Jbosscache - expiration

    Deepak m Newbie

      Hi All,


      I am trying to configure the expiration in the config file.I was not able to make it work.:(


      I want to set the expiration on every object that is store into the Cache so that the object gets deleted after specified time. I am currently using eviction where in the objects in the cache gets moved to the DB  .However i also want to purge the object if not used for specific period.Are there some example on how this should be configured or any suggestion will be really helpful.


      I am using Jbosscache Naga


      Snippet from config file




      <eviction wakeUpInterval="5000">

      <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000"> 

      <property name="maxNodes" value="100" /> 

      <property name="timeToLive" value="10" /> 

      <property name="maxAge" value="10"/> 


      <region name="/xxx/xxx"> 

      <property name="maxNodes" value="100" /> 

      <property name="timeToLive" value="10000" /> 

      <property name="maxAge" value ="100000"/> 



















        • 1. Re: Jbosscache - expiration
          Galder Zamarreño Master

          What do you mean by it's not working?


          Remember that those settings are per FQN, so when talking max nodes, it refers to max number of FQN nodes in the cache, not key/value pairs. Same applies to timeToLive and maxAge, they refer to the existance of an FQN. Finally, note that  timeToLive and maxAge are represented in milliseconds.