Hi, I experienced Two Level Cache Impl. Have a look to mail archives about TwoLevelCacheImpl. Beware of checkpoints inside batch loops. Using checkpoints make cached objects quantity growing until commit. If you have to, replace checkpoints by commit/begin.
Did you try the ObjectCacheDefaultImpl instead of OSCacheImpl ? If you do ReportQuery or read Collections with criteria, then i beleive that cache is not used (partially used in Collection retrieving). I mean SQL query is done , to find data / or PK. So you can see queries crossing in P6spy. I'm interrested in your experiences of 2 Level Cache, especially in the setting with the kind of model/processes. Regards. On 4/22/06, Westfall, Eric Curtis <[EMAIL PROTECTED]> wrote: > > Hello, I'm wondering if anyone out there has experience using OJB's > two-level caching. I am attempting to use a two-level cache to help > speed up an application I'm working on and I'm noticing some issues that > I'm curious about. > > It appears that, even if my object is already in the application cache, > OJB is still issuing the SQL to query for the object (verified using > P6Spy). Is this what's actually happening or am I mistaken? I can see > in certain cases where OJB would need to run the query in order to get a > set of primary keys to check the cache for, however, if I'm doing a > query by the primary key shouldn't it just go straight to the > application cache without hitting the database? I'm using OSCache as my > application cache, here's my configuration: > > <object-cache > class="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl"> > <attribute attribute-name="cacheExcludes" attribute-value=""/> > <attribute attribute-name="applicationCache" > attribute-value="edu.iu.uis.database.ObjectCacheOSCacheImpl"/> > <attribute attribute-name="copyStrategy" > attribute-value="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$Cop > yStrategyImpl"/> > <attribute attribute-name="forceProxies" attribute-value="false"/> > </object-cache> > > Thanks in advance, > Eric > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >