Good pointer thanks Vladim :-)
 
The difference with the xsp page ofcourse is that I cannot access the
requestparameters from within the serializer. As a matter of fact the
generatekey and cachevalidity gets called before anything else in the
serializer, so I can't generate a key based on the content that is being
processed. 
This would be the solution though. 
 
On a different note, if I put in a DeltaTimeCacheValidity(0, 5); and
generate "1" as key this does not affect the performance of my serializer.
It keeps executing at a steady "uncached" 3 seconds.
 
Any ideas on how to access request parameters within the serializer, maybe I
can use a <map:param> on the serializer in the sitemap maybe?
 
 
Thanks!
 
=================
Jorg Heymans wrote: 




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++; 

You should read cacheable.xsp and after reading in also return "1" here. 

(Otherwise you will return cahced response only on 264 request to the same
resource) 


Vadim 


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

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

Reply via email to