2 Replies Latest reply on Apr 25, 2012 5:24 AM by Galder Zamarreño

    Eviction does not work with FileCacheStore and IOException

    dex chen Novice

      I configured my cache store (a FileCacheStore) with maxEntries='2" (see below the xml config), but I see 160 files on the disk after a while. 

      Note: this is a 2 node cluster with Replication mode.

       

      Please let me anything I missed in the configuration.

       

      It seems that this is related to the "No such device" IOException which I posted in antoher post, since I see the IOExceptiion in enviction-thread.

       

      ========

       

        <namedCache name="ispn-cipherkey">

              <clustering mode="replication">

                  <stateRetrieval alwaysProvideInMemoryState="false" fetchInMemoryState="true" timeout="240000"/>

                  <async asyncMarshalling="false" replQueueInterval="5000" replQueueMaxElements="500" useReplQueue="true"/>

              </clustering>

              <loaders passivation="false" preload="true" shared="false">

                  <!-- We can have multiple cache loaders, which get chained -->

                  <loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false" purgeSynchronously="true" purgerThreads="3">

                      <!-- See the documentation for more configuration examples and flags. -->

                      <properties>

                          <property name="location" value="/test/cacheData/cipher"/>

                      </properties>

                      <async enabled="true" flushLockTimeout="15000" threadPoolSize="5"/>

                  </loader>

              </loaders>

              <transaction transactionMode="NON_TRANSACTIONAL"/>

              <eviction maxEntries="2" strategy="LRU"/>

              <!--  time units below are millseconds -->

              <expiration lifespan="-1" maxIdle="-1" wakeUpInterval="60000"/>

       

          </namedCache>