cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans-Guenter Stein <>
Subject Re: Caching in cocoon
Date Tue, 04 Jul 2000 08:43:20 GMT
Thanks Robin, this proved very helpful!

One more question: is there any strategy you could think of to cache 'parts' of
a complex page and have others be processed on every request? Example: There
might be a page with a lot of content plus a hit-counter (e.g. the
<util:counter/> from the lib included in the cocoon-distribution). When I set
'hasChanged' to 'false', the page gets cached, but the counter won't work


Robin Green wrote:

> That's what Cocoon does by default. Ensure that caching is turned on in all
> copies of Note that if using XSP, XSP pages are not
> cached unless you include a method as follows:
>   <xsp:logic>
>     public boolean hasChanged (Object context) {
>       // return true here if the page content might have changed, or
>       // false if it is safe to use a cached copy.
>     }
>   </xsp:logic>
> inside the <xsp:page> element, but outside your own root element. For the
> hasChanged() method to work, you will need a recent release of Cocoon.
> Also, if you are using <?xsp:logicsheet?> you could switch to
> namespace-mapped logicsheets instead, because these are automatically
> "precompiled" on startup if the transformer (e.g. Xalan) supports it (which
> Xalan does).
> --
> Robin
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message