1 Reply Latest reply on Mar 30, 2005 5:08 AM by belaban

    Opinion: TreeCache/CacheLoader isomorphism

    antonyblakey

      I understand that the desire to form delegating cache networks has led to TreeCache and CacheLoader having the same interface, but IMHO that interface should be split into two so that the delegation/CacheLoader interface doesn't contain non-canonical methods such as get(Fqn, Object), get(String, Object), and get(String), where get(Fqn) will do. In any case, 2.1 only calls CacheLoader.get(Fqn) in response to TreeCache.get(Fqn, Object) so it's obviously canonicalizing to some extent, although it's not indicated anywhere which CacheLoader methods are 'required' i.e. form the canonical subset.

      Is there some additional reason for the interfaces to be the same that I'm not understanding?

        • 1. Re: Opinion: TreeCache/CacheLoader isomorphism
          belaban

          The TreeCache and CacheLoader class and interface are not the same.
          I intend to provide only an interface 'Cache' for TreeCache and TreeCacheAop in 1.3. CacheLoaders would then implement that interface as well, the idea being that a Cache can be either a real Cache or a CacheLoader. This would allow for hierarchies of caches.