0 Replies Latest reply on Sep 17, 2004 5:34 AM by Bela Ban

    New CacheLoader: DelegatingCacheLoader

    Bela Ban Master

      I added a new CacheLoader, which allows for hierarchical caches, e.g. a first-level cache delegates to a second-level cache. Below is some sample code. There is also a unit test (DelegatingCacheLoaderTest) for reference.

      TreeCache firstLevel, secondLevel;
      DelegatingCacheLoader cache_loader;
      // create and configure firstLevel
      firstLevel=new TreeCache();
      // create and configure secondLevel
      secondLevel=new TreeCache();
      // create DelegatingCacheLoader
      cache_loader=new DelegatingCacheLoader(secondLevel);
      // set CacheLoader in firstLevel
      // start secondLevel
      // start firstLevel