De : David Sean Taylor [mailto:[EMAIL PROTECTED]]
> 
> > I wonder if TurbineCache does not already let you use this 
> > kind of caching policy...
> > 
> > What do you think ?
> > 
> 
> I'd really prefer to use JCS http://jakarta.apache.org/turbine/jcs/
> But I need to set aside some time to learn it first.
> 

Yes, I agree JCS looks good also but I've not tested it so far.

> But Turbine's cache is pretty nice.
> Example:
> 
> // this adds an object to the cache and lets it live for 5 seconds
> gs.addObject("cached_object",
>         new CachedObject("in_the_cache",5000));
> 
> You can also place an expiration time on your objects so the 
> Service will automatically remove them when they expire. 
> If you don't specify an expiration time, the Service uses the 
> default time et by the property cache.check.frequency in the 
> TurbineResources.properties ile. To see an example, look at the file 
> TestGlobalCache.java located in he actions folder of the Turbine source.
> 

I you use RefreshableCachedObject instead of CachedObject, it will not
expire
as long as you keep using it thus creating a real LRU cache.

--
Rapha�l Luta - [EMAIL PROTECTED]
Jakarta Jetspeed - Enterprise Portal in Java
http://jakarta.apache.org/jetspeed/

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to