I was hoping it would work with either one as it is using equals() for comparison and AffinityKey calls the keys hash/equals method.

I guess I have to keep the AffinityKeys stored somewhere to make it work.

Thanks

Mikael


Den 2017-11-26 kl. 21:36, skrev Gaurav Bajaj:
Hi,

You have to alwaya use affinity key to access the Cache for any get, put, remove operation you do. Key should be exactly same as you used to put value else it won't be able to find it.

Thanks,
Gaurav

On 26-Nov-2017 3:19 PM, "Mikael" <[email protected] <mailto:[email protected]>> wrote:

    Hi!

    If I do a cache.put( new AffinityKey( key, value), myvalue); and
    later on want to update the value, do I need do a:

    cache.put( new AffinityKey( key, value), newvalue); or can I do:

    cache.put( key, newvalue);

    If I do a put on a value that is already in the cache using a
    "non" affinity key, will the existing affinity information on the
    key be lost of I don't use the AffinityKey everytime I update the
    cache ?




Reply via email to