Re: Removing Cayenne cache groups

2010-05-30 Thread Gary Jarrel
On Sat, May 29, 2010 at 2:22 PM, Bob Schellink wrote: > > That said, DataObject.getDataContext is deprecated. What is the recommended > way to lookup the > DataDomain from inside a DataObject callback? > Configuration.getSharedConfiguration().getDomain()? > > Kind regards > > Bob > I tend to c

Re: Removing Cayenne cache groups

2010-05-29 Thread Joe Baldwin
If you have access to the ObjectContext with which you originally registered the cache group, (which I personally get via a call to the BaseContext), then that should be your DataContext instance. On May 29, 2010, at 12:22 AM, Bob Schellink wrote: > Sorry for my late reply. > > On 28/05/2010

Re: Removing Cayenne cache groups

2010-05-28 Thread Bob Schellink
Sorry for my late reply. On 28/05/2010 00:48, Bryan Lewis wrote: > This email made me aware of that cool new removeGroup and OSCache features. > Thanks. Two little howevers... > > In my testing, it worked only with LOCAL_CACHE, as the original poster > said. Not a big deal for me; SHARED_CACHE

Re: Removing Cayenne cache groups

2010-05-27 Thread Bryan Lewis
Okay, CAY-1436. On Thu, May 27, 2010 at 11:04 AM, Andrus Adamchik wrote: > > On May 27, 2010, at 5:48 PM, Bryan Lewis wrote: > > I couldn't get OSCache to work at first. I stepped through the code and >> learned that the queryCacheFactory isn't created unless the >> dataContextFactory is also

Re: Removing Cayenne cache groups

2010-05-27 Thread Andrus Adamchik
On May 27, 2010, at 5:48 PM, Bryan Lewis wrote: I couldn't get OSCache to work at first. I stepped through the code and learned that the queryCacheFactory isn't created unless the dataContextFactory is also specified. (In DataDomain.initWithProperties().) I don't see the logic to that...

Re: Removing Cayenne cache groups

2010-05-27 Thread Bryan Lewis
This email made me aware of that cool new removeGroup and OSCache features. Thanks. Two little howevers... In my testing, it worked only with LOCAL_CACHE, as the original poster said. Not a big deal for me; SHARED_CACHE is rarely necessary. The same was true with OSCache. I couldn't get OSCach

Re: Removing Cayenne cache groups

2010-05-26 Thread Andrus Adamchik
Odd. MapQueryCacheFactory supports 'removeGroup' method (although it is not very efficient compared to say OSQueryCacheFactory). Can you possibly run this in debugger to check the state of the cache? Andrus On May 25, 2010, at 3:47 PM, Bob Schellink wrote: Hi all, I'm trying to add Caye

Removing Cayenne cache groups

2010-05-25 Thread Bob Schellink
Hi all, I'm trying to add Cayenne caching for a web project I'm working on. A new DataContext is created for each request so I'm looking at adding a shared cache for entities that doesn't change often. However if one of those entities does get updated, I want to refresh the cache. To start off