Could you please explain your data access patterns? E.g. if you fetch some objects and store them in an instance variable in your application, they are not going to get refreshed automatically. To refresh objects you need to either invalidate them explicitly via context.invalidateObjects() or run a query. All the cache settings are essentially about optimizing query execution (refresh data, but only as often as needed).
Andrus On Sep 2, 2011, at 9:28 AM, Anthony Brew wrote: > Hi Gary, > Yeah thats what I am seeing in the code, but I cant for the life > of me see how to turn off the caching completely in the modeller, I actually > think it wont hit our performance very badly to have no caching. > > The cache setting I see are the in the DataDomain Configuration > > Which has an option for a Query Cache Factory with a choice of two classes. > - org.apache.cayenne.cache.MapQueryCacheFactory > - org.apache.cayenne.cache.OSQueryCacheFactory > > I selected the MapQueryCache and trie to set the size of the object cache to > 1 (couldn't set this to zero) as the application barfed saying caches had to > be greater than size zero. > > in my cayenne.xml I see the line > > <property name="cayenne.DataRowStore.snapshot.size" value="1"/> > > was added, perhaps there is some manual setting I can add to this file to > turn caching off? > > All the Best, > Anthony > > > > On Fri, Sep 2, 2011 at 12:20 AM, Gary Jarrel <garyjar...@gmail.com> wrote: > >> I'd say that would be cache related, as Cayenne is caching the data >> from the database, switch the cache of in the Modeler perhaps and that >> should fix your problem. >> >> G >> >> On Fri, Sep 2, 2011 at 3:04 AM, Anthony Brew <anthony.b...@swrve.com> >> wrote: >>> Hi, >>> I have a two processes one which writes to a several database tables >> (a >>> ruby on rails application) and a java application that reads the state >> these >>> data base tables using Cayenne and writes to other tables. >>> >>> When the ruby modifies the underlying data-base I am seeing that Cayenne >> is >>> not automatically picking up that the underlying data is now inconsistant >>> and not reloading. Is there some way I can config Cayenne to aggressive >>> check some tables for updates while ignoring others? >>> >>> Thanks a Million >>> Anthony Brew >>> >>