Thomas, Create a new cache class which extends ObjectCacheDefaultImpl; you just need to override one method:
public void cache(Identity oid, Object obj) { if (oid.getObjectsClass() /* should be cached */) { super.cache(oid, obj); } } It might make more sense to look at getObjectsRealClass(), depending on your object model. -steve Steve Clark Technology Applications Team Natural Resources Research Center/USGS [EMAIL PROTECTED] (970)226-9291 >From: "Thomas Phan" <[EMAIL PROTECTED]> >To: "OJB Users List" <[EMAIL PROTECTED]> >Subject: apply caching with condition >Date: Sat, 22 Mar 2003 18:03:39 +0800 > >Hi, > >I've N tables, and I use ObjectCacheDefaultImpl for (N - 1) tables. May we >define ObjectCacheEmptyImpl for the last table? Some tables, like the log >table, have a lot of INSERT, and they won't be SELECTed most of the time > >Thanks > >Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]