Some confusion in my mind over defining policy at the class/meta level or at the instance/runtime level. Good first step would seem to be ability to define policy at the class/meta data level to start. This need has come up a couple of times on the list.
Can also see wanting to override policy for specific optimizations at runtime, but would be most happy with formalizing the former first. -----Original Message----- From: Armin Waibel [mailto:[EMAIL PROTECTED]] Sent: Friday, February 21, 2003 9:54 AM To: OJB Users List Subject: Re: Caching of Objects Hi Stefan, I'm thinking to introduce a CacheFilter interface which allows to filter objects before cache, lookup, remove independent from the used cache implementation. Then it would be possible to do public boolean beforeCache(Identity oid, Object obj) { String cacheable = broker.getClassDescriptor(obj.getClass()).getAttribute(CACHEABLE); if(cacheable != null && (new Boolean(cacheable)).booleanValue()) { return true; } else { return false; } } It will be ditto possible to write a CacheFilter hold a list of not cacheable objects. What do you think? regards, Armin ----- Original Message ----- From: "Stefan Schl�sser" <[EMAIL PROTECTED]> To: "oJB Users List" <[EMAIL PROTECTED]> Sent: Friday, February 21, 2003 3:44 PM Subject: Re: Caching of Objects > Hi, > > > Maybe it would be useful to add an attribute 'cacheable' (true|false) to > > the > > class-descriptor in repository.dtd to flag if an object should be cached > > or not. > > This sounds like a great idea to me, it would solve my problem. In > General, I either have just a few objects of the simple type which > are cachable, or I have loads such as a master record of customers > which I wouldn't want to be cached. > > Cheers, > Stefan > > > > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
