Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-14586

make putForExternalRead a configuration property

    XMLWordPrintable

Details

    Description

      We use Invalidation Mode a lot: 

      https://infinispan.org/docs/stable/titles/configuring/configuring.html#invalidation-caches_clustered-caches

      The documentation states corerctly:

      Sometimes the application reads a value from the external store and wants to write it to the local cache, without removing it from the other nodes. To do this, it must call Cache.putForExternalRead(key, value) instead of Cache.put(key, value).

      For us it is not sometimes but always as all data should be read from an external database.

      If you do use put on node1 it sends a remove message to node2. node2 loads the data again puuting it into its cache and sending node1 a remove message. So the cache would just not be usable without putForExternalRead.

      If you configure a cache with Invalidation mode you usually need to use putForExternalRead. So this should be an option for configuration. 

      In ehcache 2.x you can say "replicatePuts=false"

      It would be nice to  make it configurable. With a configuration Option you could even use putIfAbsent which is not possible right now

      stackoverflow post:

      https://stackoverflow.com/questions/75419800/infinispan-embedded-cache-with-invalidation-mode-and-putforexternalread

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            vygen.janning Janning Vygen
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: