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]

Reply via email to