Jorg Heymans wrote:

Good pointer thanks Vladim :-)

The difference with the xsp page ofcourse is that I cannot access the
requestparameters from within the serializer.


And you should not.



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.


And you should not.



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,


You don't need request parameters there. The only thing which must affect cache key generated by serializer is *serializer's state.*


Suppose you have one serializer and it's behavior is different in AM and PM (it's got two states). Then, you have to generate the key depending on time of the day:

if (isAM) { return "1" } else { return "2" };

That's it. No request parameters. No content. Only component's state matters here. Request parameters, session attributes, etc, all taken care of well before seializer is called.


maybe I
can use a <map:param> on the serializer in the sitemap maybe?



No. <serialize/> tag can't have params.


Vadim



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



Reply via email to