cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans <Jorg.Heym...@12snap.com>
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 (http://cocoon.apache.org/2.0/userdocs/concepts/caching.html
<http://cocoon.apache.org/2.0/userdocs/concepts/caching.html> ) , should I
use these ?
 
Thanks
jorg

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message