NestedQueryCache is created per ObjectContext. The underlying data is stored in 
the common cache, prefixed with unique key. While that data is not actively 
removed from the cache when the ObjectContext (and its NestedQueryCache) go out 
of scope, it should not affect the overall cache performance. Since most caches 
have an LRU policy, those abandoned entries will eventually be pushed out of 
the cache, replaced by more recent entries from other contexts.

Andrus

> On Nov 9, 2017, at 2:08 AM, Lon Varscsak <[email protected]> wrote:
> 
> Hey all,
> 
> I would have bet large sums of money that a custom implementation of
> QueryCache would result in a new QueryCache object per context (local).
> However, it looks like a NestedQueryContext gets created and only one
> instance of the specified QueryCache is created (in DataContextFactory).
> 
> I'd really love to have local caches dumped when the ObjectContext goes
> away (assuming it's a localCache).  Is this possible?  Thoughts?
> 
> Thanks!
> 
> -Lon

Reply via email to