I'm testing a DataChannelFilter very similar to CacheInvalidationFilter with a few extras mainly invalidating groups in either Shared or Local caches. I have an annotation similar to CacheGroups but it goes further into tracking whether an object should be cached in local or shared cache.
I'll dig around a bit more in the code of NestedQueryCache and see what I can find. Thank you garyj On Tue, Sep 13, 2011 at 11:59 PM, Andrus Adamchik <and...@objectstyle.org> wrote: > Not quite sure what you are planning to test, but my guess would be you need > to use NestedQueryCache instance. > > Andrus > > On Sep 13, 2011, at 4:49 PM, Gary Jarrel wrote: > >> Ahhh I see :) so what is the best way to test local and shared cache >> from the point of view of adding and removing objects? >> >> garyj >> >> On Tue, Sep 13, 2011 at 11:34 PM, Andrus Adamchik >> <and...@objectstyle.org> wrote: >>> >>> On Sep 13, 2011, at 4:30 PM, Gary Jarrel wrote: >>> >>>> now what I am finding is that both domainCache and contextCache is the >>>> same object, when I would have though they would have been two >>>> different instance of OSQueryCache given that one is the local cache >>>> and the other is the shared cache. >>> >>> You unwrapped the NestedQueryCache yourself, so yeah, underneath it is the >>> same object ;) >>> >>> NestedQueryCache just maps itself to a unique "region" of the same cache >>> object. This way you can manage the size, notifications, expiration, etc. >>> of a single cache, and not N+1 caches where N is the number of >>> ObjectContexts in the system. >>> >>> Andrus >> > >