1 Reply Latest reply on Apr 2, 2004 7:12 PM by Ben Wang

    I repeat my eviction question

    dvasily Newbie

      I got a problem with eviction. I added to xml file eviction policy attribute.
      It looks like this

      <!-- Name of the eviction policy class. -->
       <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
       <!-- Specific eviction policy configurations. This is LRU -->
       <attribute name="EvictionPolicyConfig">
       <attribute name="wakeUpIntervalSeconds">5</attribute>
       <!-- Cache wide /COM/BusinessOrder-->
       <region name="/COM/BusinessOrder/">
       <attribute name="maxNodes">5000</attribute>
       <attribute name="timeToIdleSeconds">3</attribute>

      Now I'm running a test where I've put an object in TreeCache then put Thread.sleep(10000) - 10 seconds and now trying to get it from TreeCache. I'm expecting that it's not there because 10 >5 but I'm wrong.
      It's still in the cache. What I'm doing wrong.
      Please could you advice me.

        • 1. Re: I repeat my eviction question
          Ben Wang Master


          Can you try to sleep longer than 10 seconds, say, 15? Since the eviction timer thread runs every 5 seconds, there is a chance that 10 seconds is on the borderline.

          Otherwise, I'd suggest you check out the example JUnit tests. There are couple tests running evitction policy.