cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcelo F. Ochoa" <>
Subject Re: database caching
Date Sat, 05 Apr 2003 10:46:01 GMT
Kris Rasmussen 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
  You can use DBPrism external invalidator server for Cocoon 
(, it use ESI 
invalidation protocol ( to control the 
cache coherence betwen Cocoon and the database server.
   Now DBPrism external invalidator server is separate component of 
DBPrism which can be used into Cocoon and XSP pages without installing 
   The flow of invalidation messages is detailed at: .
   A simple usage of this cache scheme could be tested at the source of this page 
is at
   This XSP page is valid (cached) until Cocoon receives an invalidation 
message from an external resource (database or a simple telnet session), 
note that the signature of the page shows a server time that never change.
   The caching behaviour is configure through a sitemap parameter like this:

    <map:generate src="xsp/{1}.xsp" type="serverpages">
        <map:parameter name="ESI-Key-Pattern" 
        <map:parameter name="test_param1" value="test1"/>
        <map:parameter name="test_param2" value="test2"/>

   ESI-Key-Pattern parameter controls which argument, cookie or header 
defines a personalization tag, or the discrimination value for the same 
page, for example a page like could include a cookie value 
which control different pages for every different logged user, in that 
case Cocoon will store different pages for each user logged, on the 
example above only id_user http parameter is used as personalization key.
   The new implementatin of DBPrism invalidator server (available 
through CVS 
includes a new imlementation using HSQLDB in memory database it is 
slightly slow than the previous one implementation using Hashmaps but 
more scalable.
  A sub sitemap example is available at 
if you need more information sent me an email.
  Best regards, Marcelo.

Marcelo F. Ochoa -
Do you Know DB Prism? Look @
More info?
Chapter 21 of the book "Professional XML Databases" (Wrox Press
Chapter 8 of the book "Oracle & Open Source" (O'Reilly
Lab. de Sistemas - Fac. de Cs. Exactas - UNICEN
Paraje Arroyo Seco - Campus Universitario
(7000) Tandil - Bs. AS. - Argentina
Te: +54-2293-444430 Fax: +54-2293-444431

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

View raw message