-
1. Re: RemoteCache always returns null
mark.k Oct 6, 2015 1:56 PM (in response to mark.k)Just to add to this, if I disable the store-as-binary setting, I get a value back at the RemoteCache. I would like to use store-as-binary because then we don't need to worry about modifying in-cache values during an operation until the put. How do we get both working together?
Thanks,
Mark.
-
2. Re: RemoteCache always returns null
galder.zamarreno Oct 8, 2015 7:29 AM (in response to mark.k)I think the issue you are seeing is a bug. Could you create an Infinispan JIRA via JBoss Issue Tracker and add all the information there?
I would like to use store-as-binary because then we don't need to worry about modifying in-cache values during an operation until the put
^ Based on this info, I assume you are accessing the same cache via Remote Cache and embedded cache as well? Although your use case is valid, and in fact we use storeAsBinary setting as a way to enable cache-by-value for JCache, my recommendation would be to switch it off since it has an added cost in terms of performance to switch backwards/forwards between object and byte array format.
An alternative way to avoid users modifying in-cache values would be to make the cached values effectively immutable. Trying to keep immutable data can involve extra memory since modifications are made by creating new instances which include final state.
Cheers,
Galder
-
3. Re: RemoteCache always returns null
mark.k Oct 8, 2015 10:11 AM (in response to galder.zamarreno)Yes, we are using both embedded and remote cache managers. Our application cluster runs the embedded caches, and we have clients/tools that access that cluster over HotRod. We have large device configurations stored in the cache which must be modified atomically, and so we were depending on the store-by-value to prevent in-cache mutation.
I will create a bug for this.
Thanks
Mark.