You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bjarne Jensen <bh...@ruc.dk> on 2001/06/29 14:36:01 UTC
Any example of a cached XSP-page needed (C1.8.2) - would anyone send a simple example?
Hi,
I was trying to find out how I can cache a XSP-page. But the message
"..served form cache.." is not in the bottom of my pages. So... does anyone
have a working example that they would like to share? I have looked in the
"Cache documentation", but I need a full working example.
Below is my try - There are no errors but also no cache.
/Bjarne
<?xml version="1.0" encoding="iso-8859-1"?>
<?cocoon-process type="xsp"?>
<xsp:page xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:util="http://www.apache.org/1999/XSP/Util">
<xsp:structure>
<util:cacheable/>
</xsp:structure>
<xsp:logic>
public boolean hasChanged (Object context) {
return false;
}
</xsp:logic>
<html>
<xsp:logic>
// Define a variable to hold the time of day
Date now = new Date();
</xsp:logic>
<p>
To the best of my knowledge, it's now
<!-- Substitute time of day here -->
<xsp:expr>now</xsp:expr>
</p>
</html>
</xsp:page>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>