-
1. Re: updates on remote cache
chavarao Apr 5, 2012 10:30 AM (in response to venkataratnamteki)In order to update on remote cache you need do cache.put(st).
-
2. Re: updates on remote cache
venkataratnamteki Apr 5, 2012 2:06 PM (in response to chavarao)@Nag,
So, its not like in local cache? in local cache, i do not need to do cache.put(k,v) . Probably value will be stored as a reference. So, if we do the below, it will update the object in the cache..
Book b = cache.get("key");
b.updateSomeProperty("new property");
and if i do cache.get("key") now, i will get the updated book object..
So, my doubt is, does this hold good in remote cache also??
-
3. Re: updates on remote cache
dan.berindei Apr 6, 2012 4:46 AM (in response to venkataratnamteki)On the local node Infinispan does not copy the inserted objects and keeps a reference to the original object instead (unless you enable storeAsBinary). So all the changes made to those objects are automatically visible in the cache, but that is just an accidental effect of how Infinispan stores values - there isn't any effort to track changes to your objects and update the values in the cache.
The remote nodes obviously can't hold a reference to your objects, so they won't see any changes this way. The old JBossCache project had a "POJO Edition" that would track changes to objects and automaticall update the copies on all the cluster nodes, but it hasn't been ported to Infinispan.