cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Per Bohlin <>
Subject XSP: caching?
Date Wed, 02 May 2001 09:35:17 GMT
I have xsp pages, which does some db selects, creates xml pages, and then are
xsl-parsed to html. 

This is quite slow, my testpage gets around 0,5 pages/sec. Obvious solution is
to cache the pages so it doesn't need to be regenerated for every request.

Looking at, I find that:

1) Cocoon caches the final html result of the request
2) XSL transforms are always cached
3) XSP are by default never cached

It is clear that the xml is always regenerated, but what of the xsl transform?
If the xml to be transformed results from an xsp, are the html result of the
transform always regenerated, even when the generated xml is unchanged since
last request?

I also tried enabling caching of xsp, adding <util:cacheable/> and the
hasChanged()-method. I now get about 0,6 pages/sec, so something is wrong
(a static version of the testpage gets 10 pages/sec). I suspect the jump from
0,5 to 0,6 is just coincidence, and that the pages still aren't cached.
Adding the isCacheable() method made no difference either.

Now, what am I doing wrong? 

Versions in use are cocoon 1.8.2, jakarta-tomcat 3.2, apache 1.3.14,
sun jdk 1.2.2, slackware linux 7.1. 

This is the xsp code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE articlelist SYSTEM "settings.dtd">

<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="/articlelist.xsl" type="text/xsl"?>

<xsp:page language="java"


	public boolean hasChanged (Object context) {return false;}
	public boolean isCacheable (HttpServletRequest request) {return true;}


	[snipped the pagegenerating stuff]	



/ Thankful for any help, Per Bohlin,

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message