The REST server's optimistic currency control is not atomic. The sequence in e.g. a PUT request goes like this:
- cache.put (if preconditions met)
Which is not inside any lock (that would make it pessimistic, anyway), in other words, a race condition.
This applies to the optimistic variants, i.e. requests carrying 'If-Match' or any of the other 'If-*' preconditions, of PUT, POST, and DELETE requests.