從緩存文件: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.
和
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
我的問題是:
請求1被實例A提供服務:一個對象更新並保持。由於對象已被修改,會話緩存將被更新。
請求2由實例B服務(由於先前的請求,它們已經是會話緩存中的對象):會話緩存將因差異而變得不同,因爲它是另一個實例。 請求如何獲取更新的實體而不是前一個?
App Engine memcache是跨實例共享的,但會話高速緩存對於每個實例(或者甚至是Objectify實例)都是單獨的。
會話緩存是否以某種方式在所有實例之間同步?
是否有可能由不同實例提供服務的不同請求可能具有相同對象的不同版本?