1) How does Ignite implement this Cache#boolean replace(K key, V oldValue, V
newValue) function?JSR107 tells that it's equivalent to: if
(cache.containsKey(key) && *equals*(cache.get(key), oldValue)) {
cache.put(key, newValue); return true; } else { return false; }but I assume
this is just logical equivalence.How Ignite really perform
"equals(cache.get(key), oldValue)"? Or it uses some more intelligent way,
like comparing some hash codes or other kind of metadata. Performing
"equals" on the values could be very expensive operation.My question is very
practical. I'm implementing a Web-service that's backed by Ignite, which has
to support "Last-Modified" or "ETag" HTTP headers. These headers would make
sure the data has not been sent over the wire unnecessarily if nothing has
changed, and the data has not been concurrently updated since the last time
it was requested. These headers allow client or proxy to cache the data,
especially if the data is of a substantial size. I'm struggling to find the
most optimal way to map it to my cache operations. Therefore, here is my
second question.2) How would you recommend implementing "Last-Modified" or
"ETag" semantics based on Ignite? (more specifically in the context of
replacing/updating the values)
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/