cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans <>
Subject implementing <<Cacheable>>
Date Thu, 12 Jun 2003 11:43:30 GMT
Hi all,
How can I add caching to my custom written serializer? On average my
serializer takes 3 seconds to complete (regardless whether I implement the
cacheable interface or not)
My serializer implements 2 interfaces : Serializer and Cacheable. 
Implementation of the caching interface :
      public long generateKey() {
            //cachekey is long var
            //note that the svgserializer returns 1 here ????
            return cacheKey++;
       * @return
      public CacheValidity generateValidity() {
            //stole this from the svgserializer
            return NOPCacheValidity.CACHE_VALIDITY;
Is this implementation correct at all? What do I need to do more? My
serializer is doing some expensive remote calls and gets back binary data,
this is all fairly static though so caching would be in order.
Reading up on the docs, there seems to be an event-cache and stream-cache
available (
<> ) , should I
use these ?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message