2 Replies Latest reply on Jun 9, 2010 10:23 AM by Lin Ye

    Questions on cache loaders

    Lin Ye Novice

      We'll need cache initialization from persistent storage with low latency. Which cache loader would be recommended? The file system based cache loader or JDBC cache loader?

       

      When picking a cache store, what are the things to pay attention to for replicated mode vs. distributed mode? For example, if we have local unshared file based cache store, for distributed mode will the file based cache store on each cache instance have all cache entries in the cluster?

       

      For file based cache loaders, such as JdbmCacheStore, there is a link to the JDBM project itself. However, where to find the detailed instructions on how to hook it up to Infinispan with configuration examples?

        • 1. Re: Questions on cache loaders
          Galder Zamarreño Master

          A central persistent store would be easier to maintain rather than having to deal with individual node's local storage, although the latter would definitely have lower latency. If you go for a local option, FileCacheStore or  BdbjeCacheStore would be the best options. If using a central store, JDBC based would be the primary choice.

           

          Replicated vs distributed doesn't change much. Obviously, if you have an unshared local cache store and use distribution, you'll only have data that belongs to that node or that has been distributed to that particular node. It won't have all the entries in the cluster. If it's replicated it will indeed have all the entries. If you used a central store and used distribution, it'd have all entries and the originator of the call would be responsible for storing the data in the central store.

           

          Wrt  JdbmCacheStore, something like this should so:

           

          <namedCache name="withLoader">
             <loaders passivation="false" shared="false" preload="true">
                <loader class="org.infinispan.loaders.jdbm.JdbmCacheStore" fetchPersistentState="false"
                        ignoreModifications="false" purgeOnStartup="false">     
           
                   <properties>
                      <property name="location" value="/tmp/JdbmCacheStore-Location"/>
                   </properties>
                   <async enabled="false" />
                </loader>
             </loaders>
          </namedCache>
          
          • 2. Re: Questions on cache loaders
            Lin Ye Novice

            Thanks for the information.