1 Reply Latest reply on Jun 28, 2005 9:17 PM by manik

    Asynchronous cache loaders

    manik

      Asynchronous cache loading is now available in CVS, and this implementation includes the following:

      - An AsyncCacheLoader delegating cache loader which implements the CacheLoader interface
      - An additional CacheLoaderAsynchronous property on the TreeCache which determines whether the delegating cache loader is used (false by default)
      - Updated TreeCache documentation with usage information and examples
      - Updated training slides with usage information and examples

      For more detailed info, check out HEAD on JBossCache, build the docs, and have a look at the TreeCache docs under 'CacheLoaders'.

      Cheers,
      Manik

        • 1. Re: Asynchronous cache loaders
          manik

          Let me add some more detail, from the documentation, for those who do not want to rebuild the docs just to see what this is all about!! :)

          <attribute name="CacheLoaderAsynchronous">true</attribute>
          



          CacheLoaderAsynchronous (configuration property) determines whether writes to the cache loader block until completed, or are run on a separate thread so writes return immediately. If this is set to true, an instance of
          org.jboss.cache.loader.AsyncCacheLoader is constructed with an instance of the actual cache loader to be used. The AsyncCacheLoader then delegates all requests to the underlying cache loader, using a separate thread for write operations. See the Javadocs on org.jboss.cache.loader.AsyncCacheLoader for more details. If unspecified, the CacheLoaderAsynchronous property defaults to false.


          Note on using the CacheLoaderAsynchronous property: there is always the possibility of dirty reads since all writes are performed asynchronously, and it is thus impossible to guarantee when (and even if) a write succeeds. This needs to be kept in mind when setting the CacheLoaderAsynchronous property to true.