7 Replies Latest reply on Feb 2, 2010 11:18 AM by Amin Abbaspour

    Persistent Caches - when do the contents get written.

    John Ament Master

      I have the following cache configuration, which is pretty much verbatim from the sample files

       

      I'm trying to figure out though, when do the cache contents get written to disk?

       

      {code:xml}<namedCache name="persistentCache">

            <!--

                  Cache loaders.


                  If passivation is enabled, state is offloaded to the cache loaders ONLY when evicted.  Similarly, when the state

                  is accessed again, it is removed from the cache loaderold and loaded into memory.


                  Otherwise, state is always maintained in the cache loaderold as well as in memory.


                  Set 'shared' to true if all instances in the cluster use the same cache loaderold instance, e.g., are talking to the

                  same database.


                  If "preload" is true, all keys are loaded from the cache loaderold into memory upon starting the cache.

               -->

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


               <!--

                  We can have multiple cache loaders, which get chained

               -->

               <loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true"

                       ignoreModifications="true" purgeOnStartup="false">


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

                  <properties>

                     <property name="location" value="/ssg/scorecard"/>

                  </properties>

                  <singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>

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

               </loader>

            </loaders>


            <deadlockDetection enabled="true" spinDuration="1000"/>


         </namedCache>{code}