cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: JCache/EHCache scope
Date Mon, 20 Mar 2017 11:47:16 GMT
JCache/EhCache implementation maintains a single "physical" cache object per Cayenne cache
group. It is shared between Cayenne shared cache and each one of the per-context local caches.
To distinguish the entries from say 2 ObjectContexts within the cache we use unique key prefixes.
When an ObjectContext goes away, its cache entries stay in the cache, but become effectively
inaccessible. They will eventually get removed or replaced with other entries by the cache,
depending on the cache settings.


> On Mar 16, 2017, at 9:24 PM, Lon Varscsak <> wrote:
> When using JCache (in my case it’s implementation is EHCache) is an
> ObjectContext’s localCache tied to the object context or is it global?  In
> other words, if I use localCache will the cache go away when the object
> context goes away or does it persist?
> -Lon

View raw message