2 Replies Latest reply on Jan 12, 2012 9:55 AM by jaydev

    eviction definition/example

    jaydev Newbie

      Hi,

       

      I am pretty new to infinispan and was trying to understand the functionality of "eviction" for a namedCache.  I will explain below what I think it is.  Please correct me if I am wrong.

       

      Eviction provides the ability to store cache records into the cache store (after setting up a loader, which I did).  Once the maxEntries value has been reached, infinispan starts "overflowing" to the disk (if using FileCacheStore).  If a record has been needed that is on the disk and no longer in the namedCache, it will be "activated" and read from disk.  This process allows control the amount of memory consumed by the cache based on the chosen eviction strategy.

       

      That said, I have a cache with 200 values.  I set the maxEntries=100.  According to the above, 100 should automatically be evicted to disk.  However, when fetching for the other 100 values, it throws null exceptions => I thought that it was supposed to "activate" those records since they are now requested...

       

      I could be completely wrong about the eviction functionality/mechanism but could not find many examples.  The documentation is very brief...

       

      I am using version 5.0.

       

      Please help me understand!!

       

      Thanks,

      Julien