3 Replies Latest reply on Sep 10, 2006 12:18 PM by Ben Wang

    Eviction - forcibly?

    Supriya Vaidya Newbie

      Hi -

      I am not sure if I understood this right, so please go ahead and hit me up if I am wrong!! :)

      The Eviction policy specifies when a node should be removed from the cache. There are various algorithms implemented. For example, the LRU - where the least recently used node is evicted after an idle time of 'timeToLiveSeconds'.

      I am not sure if I missed this in the documentation, but what I need is a forcible eviction of all nodes from the cache, and a fresh reload. For example, after 2 hours, all nodes must be recached. I thought maxAgeSeconds would be ideal for this (maxAgeSeconds = 7200 for example, would mean that if wakeUpIntervalSeconds = 7201, then all these nodes would be swept away.

      However, I also heard that parameter has now been deprecated. Is this right? If so, how do I go about achieving this?

        • 1. Re: Eviction - forcibly?
          Ben Wang Master

          No, it is still there. You can try it yourself.

          • 2. Re: Eviction - forcibly?
            Supriya Vaidya Newbie

            Hi - I tried that, with some very simplistic settings:

            <!-- Name of the eviction policy class. -->
            <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
            <attribute name="EvictionPolicyConfig">
            <attribute name="wakeUpIntervalSeconds">5</attribute>
            <!-- Cache wide default -->
            <region name="/_default_">
            <attribute name="maxNodes">5000</attribute>
            <attribute name="timeToLiveSeconds">1000</attribute>
            <!-- Maximum time an object is kept in cache regardless of idle time -->
            <attribute name="maxAgeSeconds">120</attribute>
            <region name="/org/jboss/test/data">
            <attribute name="maxNodes">5</attribute>
            <attribute name="timeToLiveSeconds">4</attribute>

            But I get an error of the kind:
            - read Method _evict(/Neat/CsticControl/EU) called - don't know how to handle, passing on!

            Does this mean that its not evicting my data?

            • 3. Re: Eviction - forcibly?
              Ben Wang Master

              Not sure. Can you post your log?