4 Replies Latest reply on Mar 12, 2007 1:12 AM by haribaasha

    question w.r.t eviction policy

    haribaasha

      i am using jboss cache with LFU policy with a maximum of 7500 and minimum of 5000 nodes. i am also using a cachloader with a persistance storage using the sleepycat dbjava implementation.

      now my doubt is this, consider a scenario where i load 10000 nodes, all these 10000 nodes will be written to storage in a file in a location specified by me, and since i specified the max nodes as 7500, the nodes in-memory will be 7500.

      Now if i want to remove any node, is there any way the eviction policy can remove the node from the in-memory cache as well as the persistant storage ?

      or is there a different policy which can do wat i need?

      thanks
      hari

        • 1. Re: question w.r.t eviction policy
          manik

           


          Now if i want to remove any node, is there any way the eviction policy can remove the node from the in-memory cache as well as the persistant storage ?


          Removing and evicting are different things.

          Eviction only happens to the in-memory state.

          Removing happens to both the in-memory state as well as the persistent storage.

          So, if you were to remove a node, even if the node is NOT in memory, it will still be removed from persistent storage.

          • 2. Re: question w.r.t eviction policy
            haribaasha

            oh alright, so the eviction policies will evict from the in-memory cache and not the persistent storage...

            the only way by which a node can be removed from both the in-memory cache and the persistent storage is by explicitly calling "remove" ?

            i was looking for a way by which nodes from both the in-memory and persistent storage can be pruned automatically based on the time they have lived..

            • 3. Re: question w.r.t eviction policy
              manik

              You'd have to write your own timer-based code to do these removes then.

              Basically, persistent storage is, well, persistent. :-)

              • 4. Re: question w.r.t eviction policy
                haribaasha

                I wrote my own code which will remove the node from the cache instead of evicting it. THis removes it from in-memory and the persistent storage as well. :)

                Thanks
                Hari