cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcelo F. Ochoa" <moc...@ieee.org>
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 
(http://www.dbprism.com.ar/dbprism/doc/xdocs/Server.html), it use ESI 
invalidation protocol (http://www.w3.org/TR/esi-invp) 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 
DBPrism.
   The flow of invalidation messages is detailed at: 
http://www.dbprism.com.ar/dbprism/doc/cms/CMS-WebCache.html .
   A simple usage of this cache scheme could be tested at 
http://www.dbprism.com.ar/dbprism/xsp/simple_ext the source of this page 
is at 
http://www.dbprism.com.ar/dbprism/view-source?filename=/docs/samples/xsp/simple_ext.xsp
   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" 
value="ParameterPattern=id_user"/>
        <map:parameter name="test_param1" value="test1"/>
        <map:parameter name="test_param2" value="test2"/>
    </map:generate>

   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 my.yahoo.com 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 
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dbprism/prism/bin/) 
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 
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dbprism/cms/dbprism/ext/ 
if you need more information sent me an email.
  Best regards, Marcelo.

-- 
Marcelo F. Ochoa - mochoa@ieee.org
Do you Know DB Prism? Look @ http://www.dbprism.com.ar/dbprism/doc/Home.html
More info?
Chapter 21 of the book "Professional XML Databases" (Wrox Press 
http://www.wrox.com/)
Chapter 8 of the book "Oracle & Open Source" (O'Reilly 
http://www.oreilly.com/catalog/oracleopen/)
-----------------------------------------------
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: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message