From the caching documentation: https://github.com/objectify/objectify/wiki/Caching
The session cache is local to the Objectify instance. If you start a new session (via ObjectifyFactory.begin()), it will have a separate cache. If you use the thread-local ObjectifyService.ofy() method, the session cache will "just work" appropriately.
and
A get-by-key operation (single or batch) for a cached entity will return the entity instance without a call to the datastore or even to the memcache
My question is:
Request 1 is served by Instance A: an Object is updated and persisted. The session cache will be updated due to the object has been modified.
Request 2 is served by Instance B (which have already the Object in session cache due to a previous request): the session cache will be differente because it is another instance. How can the request get the updated entity instead of the previous one?
The App Engine memcache is shared across instances, but the session cache is single per instance (or even Objectify instance).
Is the session-cache synchronized among all the instances in some way?
Is it possible that differente requests served by different instances can have different versions of the same object?