Hi Thomas,
with next release (current CVS) it will also be possible
to implement CacheFilter classes. These classes will be
used for pre-filtering the cache.
Two implementations are currently in the code base,
one for filtering classes using a custom attribute in
class-descriptor, one for filtering whole packages
using a custom attribute in connection-descriptor.
More info see OJB.properties file and the javadoc
of the implementation classes (org.apache.broker.cache).
Advantage: Filtering is independend from the used ObjectCache.
Disadv.: Use of many filters slow down cache performance.
regards,
Armin
----- Original Message -----
From: "sclark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 24, 2003 6:25 PM
Subject: Re: apply caching with condition
> 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]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]