1 Reply Latest reply on Jun 2, 2008 7:30 AM by Manik Surtani

    Avoid evict on PUT and some general questions near the subje

    Peter Kovgan Newbie

       

      Use the Cache.putForExternalRead() method when you are caching something that was just read from an external authoritative source (aka an RDBMS). If the cache is configured for invalidation, that method will not generate an invalidation msg. Then use put() if you are creating something new or have updated something. That *will* generate an invalidation msg, as it should.

      The above is a quick description of how the latest Hibernate 2nd Level Cache impl uses JBC; the putForExternalRead() method was added and tweaked and massaged exactly for your use case. ;)

      This is a quote from some old thread.
      It helps.
      But the problem of synchronization between instances in cluster is not solved by this.
      If server A was just starting and loads object in cache, then server B will remain with obsolete version of that object.

      1. Is it posible replicate on PUT and invalidate on remove/change?
      For me it seems like solution.
      2. what elese may be done?

      Thanks!!!