9 Replies Latest reply on May 17, 2005 12:29 PM by tcherel

    Eviction and cache access

    tcherel

      Two quick questions about the eviction mechanism.
      I admit, I did not do extensive searches in the forum to see if this has been already answered before.

      1) If I am writing my own TreeCacheListener, in the execution of the nodeEvicted operation, is it safe to access the data about to be evicted in the cache? Will it impact the eviction in any ways?

      2) Let's say that I am adding the nodes /a/b and /a/c in a cache with an LRU eviction policy with a 10 seconds time to live and a 5 seconds wake-up interval.
      After 12 seconds (not touching any of the nodes), it seems that nodes /a/b and /a/c are evicted. But node /a is evicted "shortly" (a few seconds) after, not at the same time, not 10 seconds after.
      Is the eviction of the nodes /a/b and /a/c seen as an "update" of the node /a and then impacts the potential time at which node /a will be evicted?

      Thanks.

      Thomas