cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Howard <coc...@leverageweb.com>
Subject Re: database caching
Date Wed, 02 Apr 2003 12:48:06 GMT
Cocoon does not automatically cache xsp pages with esql tags, but provides 
a means for you to tell it to do so.  Have a look at the caching xsp 
sample, and probably the javadocs for the caching related classes.

In general, you'll need your generator (which is what your xsp produces 
automatically) to provide two things: a unique key that distinguishes the 
current result from others the same generator creates.  Generally, you'd 
want to hash any information the esql uses - probably from the request - 
and use that as your key.  Second, you need to provide information about 
the scheme you want Cocoon's cache to use to figure out if the cached 
content it holds is still valid.  The easiest in the case of database 
results is to do time-based validity.  Cache until a certain time, or for a 
certain duration.

If you need more information, you'll need to specify what version you're 
working on.

HTH,
Geoff Howard

At 03:43 PM 4/1/2003, you wrote:

>How does cocoon handle caching of xsp pages with esql tags? It seems to me 
>that cocoon would have to generate the xml output of the xsp page every 
>time the page is called, and thus would be unable to cache any xsl 
>translation latter? Is this true? If so would it not be a better idea to 
>have the page be translated into html before all database code is called 
>and then insert the database code at the very end and output as a jsp page 
>or something?
>
>Kris
>
>
>
>Do you Yahoo!?
><http://us.rd.yahoo.com/finance/mailsig/*http://tax.yahoo.com>Yahoo! Tax 
>Center - File online, calculators, forms, and more


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message