6 Replies Latest reply on Apr 10, 2012 9:02 AM by Galder Zamarreño

    unable to understand how infinispan is evicting entries from cache.

    venkataratnam teki Newbie

      I wrote simple junit to test the local cache on infinispan.

       

      Eviction Config:

      Max entries = 100

      Strategy = LRU

       

      Expiration Configuration:

      lifespan=50000

      maxidle=50000

      wakeupinterval=10

       

      Code snippet for puts:

      ---------------------------------

      for(int i = 1; i < 100; i++) {

                                    testCache.put("key"+i, "value"+i);

      }

       

      the output when i do get is,

       

      value1

      null

      value3

      value4

      null

      null

      value7

      value8

      value9

      null

      value11

      value12

      null

      null

      value15

       

       

      My doubt is, why the entries are getting evicted? i have 100 entries as my max entries, and i did put 99 entries.

       

      Am i doing something wrong in my configuration? Can someone please help me out!