Friday, 12 July 2013

Store data by reference or by value?

Traditionally, Infinispan has always stored data by-reference. Once clients store some data, clients can still modify entries via original object references. This means that since client references are valid, clients can make changes to entries in the cache using those references, but these modifications are only local and you still need to call one of the cache's put/replace... methods in order for changes to replicate.

Obviously, allowing clients to modify cache contents directly, without any cache invocation, has some risks and that's why starting with Infinispan 5.3.0.Final, it offers the possibility to store data by-value instead. The way store-by-value is enabled is by enabling Infinispan to store data in binary format and forcing it to do these binary transformations eagerly.

We've also added an FAQ entry that clarifies this topic.


No comments:

Post a Comment