1 Reply Latest reply on Jan 7, 2005 12:52 PM by ben.wang

    Multiple invocation of CacheLoader

    danielherlitz

      This is the situation:

      Two JVMs, each is running an instance of TreeCacheAop. Same cluster. Replication (have tried both synchronous and asynchronous).

      When I call getObject("/foo") on both servers at roughly the same time, and "/foo" does not exist in the cache, then both servers end up asking the CacheLoader for data. They both call:

      CacheLoader.get(Fqn name)

      The problem is that the data can be very hard to produce and I would like the CacheLoader to be invoked only on one server and have the other call to getObject block until the data is loaded and replicated.

      Am I missing something. I had really expected this to be the default behaviour.