This one time, at band camp, Techeira, Vincent X -ND said:

Vincent, 

Please see my comments inline. 

TVXN>I had a few questions about Castor internal caching mechanism.
TVXN>
TVXN>Does each JDO instance maintain it's own instance of the cache?  In other words 
if I define JDO objects for two DB datasource and an XML datasource, is the cache the 
refer shared (i.e. the instance); or do they each maintain their own instance of the 
cache?  It would make sense to me it the case was the latter.

Each JDO instance maintains its own cache. 

TVXN>Does each org.exolab.castor.jdo.Database maintain it own instance of the cache or 
is it shared, i.e. they cache the invalidate when updating data is the same assuming 
they were both obtain from the same JDO instance?  My examination of the code suggests 
that the latter is the case as well.  In other words, give two Database connections 
obtained from the same JDO, will expire the same cache when they update data 
independent of which one was used to do so.
TVXN>
TVXN>If my previous assumptions are correct, is it safe to also assume that a best 
practice would be to treat each JDO instance for a datasource as a Singleton?  In 
other words, is it best to only create on JDO instance per Datasource (albeit XML or 
DB)?

Yes, that's a good practice. 

Bruce
-- 
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to