|
From: Aaron S. <aar...@ve...> - 2001-06-19 00:30:38
|
-----Original Message----- From: Aaron Smuts [mailto:aar...@ve...] Sent: Tuesday, May 15, 2001 8:26 PM To: tur...@ja... Subject: RE: Global Cache problem What if the cache checked for expiration when an element was retrieved. If a lazy date was used this wouldn't realy slow things down. The background process shouldn't eat up much of the processor though. The interval should be configurable? I'm working on an implementation of the ocs4j cache. Regions or caches can be defined and groups within regions can be controlled, for removal of related items. Partial retrieval (proto-liek queries are too difficult and slow ), however by group access is simple. Getting the keys in a group would be a simple matter, hence associated values could be pulled as needed. I'll have a possible solution in a week. Aaron -----Original Message----- From: jmcnally [mailto:jmcnally]On Behalf Of John McNally Sent: Tuesday, May 15, 2001 1:34 PM To: tur...@ja... Subject: Re: Global Cache problem Gareth Coltman wrote: > > Hi, > > I need to store lookup tables as I previously mentioned, and the > TurbineGlobalCacheService seemed perfect for this. > > My cache objects need to persist for the entire lifetime of the > application(ie from startup to shutdown), and this is what's causing > problems. > > 1. I can't work out how I can perform early initialisation - I need to load > database data into the cache on system startup. Services are the way to make sure you get early initialisation. Another simple way is to load the cache in a static initializer in a class that is used for accessing the cache. > 2. I want to stop the cache from constantly housekeeping. It's a waste of > processing for my application. There is a CachedObject.setTTL(-1) method that will stop the cleaning up of objects in the cache, but I do not know if it is possible to eliminate the housekeeping from at least looking for expired objects. john mcnally > > The other thing I would like is to divide my Cache into namespaces (or > different caches), so I can make the cache return all of a certain type of > element, without having to iterate through the entire cache. > > Has anyone else had to implement something similar? > > Gareth > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tur...@ja... > For additional commands, e-mail: tur...@ja... --------------------------------------------------------------------- To unsubscribe, e-mail: tur...@ja... For additional commands, e-mail: tur...@ja... --------------------------------------------------------------------- To unsubscribe, e-mail: tur...@ja... For additional commands, e-mail: tur...@ja... |