That should work. Not sure what the problem is. On Aug 3, 2012, at 6:08 PM, Atli Páll Hafsteinsson wrote:
> Hi, thanx for the reply. > > I am using oscache and set the "cayenne.default.refresh = 20" but > queries seem to be cached longer that 20 sec. I do not explicitly set > the cache group form my queries, do I need to do that or do they end > up in some default group? > > Regards, > Atli Páll Hafsteinsson > [email protected] > > > On Fri, Aug 3, 2012 at 2:42 PM, Andrus Adamchik <[email protected]> > wrote: >> Hi there, >> >> So per http://cayenne.apache.org/doc/caching-and-fresh-data.html we have >> object cache and query cache. We are planning to align the two at some point >> with common config and management facilities. As of now object-level cache >> is not "managed". So you can't expire things from it, only refresh >> explicitly. >> >> However there's query cache that can be fully managed, and maybe that's what >> you want. So whenever you need a group of objects, you just run a query with >> a certain cache group and cache policy. Depending in the cache >> configuration, it will either be immediately returned from cache, or >> refetched. And a refetch would update the object cache as a side effect. >> Personally with query cache I barely ever look back at the object cache. >> >> Andrus >> >> On Aug 3, 2012, at 5:12 PM, Atli Páll Hafsteinsson wrote: >> >>> Hi >>> >>> I have two separate cayenne applications reading and writing to the >>> same database. The object cache is not shared between those >>> applications so when data is written to the db in one application it >>> is not immediately reflected in the the other application. Can I turn >>> of the cache (there is not that much traffic) or somehow set the >>> expiration time to a few seconds? >>> >>> Regards, >>> Atli Páll Hafsteinsson >>> [email protected] >>> >> >
