On Thu, 20 May 2004, Askild Aaberg Olsen wrote:
> [EMAIL PROTECTED] wrote:
> >
> > thnx rof your hints but
> >
> > the problem is that i dont want to chache the xsp but the xml
> > content that
> > xsp generate. The XSP run a esql query and produce a
> > 7000-10000 nodes xml
> > i want to avoid runing the xsp (java) code again and again
>
> That's what they are trying to tell you; how to cache the result of the XSP,
> not the XSP itself (this is done automaticly by the Cocoon caching pipeline)
>
> If you add the following code to your XSP, the result (not the XSP) will be
> cached for 120 seconds:
>
> public SourceValidity getValidity() {
> int validity = 120;
> return new ExpiresValidity(validity * 1000);
> }
>
> Add this in the /xsp:page/xsp:logic-element.
>
> Askild
> -
thnx askild
this is exactly what i need but with one modification
is it possible to turn cache ON/OFF manualy?
--stavros
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]