cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JEULIN Olivier <olivier.jeu...@xml-ais.com>
Subject RE: Does cache work in Cocoon 1.8.2 on Tomcat 3.2.1?
Date Tue, 26 Jun 2001 13:30:07 GMT
Hi,
as explained in the "caching" section of the documentation, some contents
are
never cached, except if you tell cocoon to do so. If you use XSP, you'll
have to overload the 'hasChanged' method and put a <util:cacheable/>.
Anyway, here is a small example that is cached for me, and with the very
same configuration:
as I only apply a XSLT transform (cacheable & doesn't invalidate the cache),
the page is cached just fine.
---------xml file--------

<?xml version="1.0"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="chainage-html.xsl" type="text/xsl"?>
  <page>
    <a>
      <b>
        <c/>
      </b>
    </a>
  </page>
---------chainage-html.xsl--------
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="page">
  <xsl:processing-instruction
name="cocoon-format">type="text/html"</xsl:processing-instruction>
  <html>
    <head><title>CHAINAGE</title></head>
    <body>
	<xsl:apply-templates/>
    </body>
  </html>
</xsl:template>

<xsl:template match="a|b|c">
	<pre><xsl:value-of select="name()"/> non traité</pre>
	<xsl:apply-templates/>
</xsl:template>

<xsl:template match="p">
	<pre><xsl:value-of select="."/> traité</pre>
</xsl:template>

<xsl:template match="@*|node()|comment()|processing-instruction()|text()">
 <xsl:copy>
   <xsl:apply-templates
select="@*|node()|comment()|processing-instruction()|text()"/>
 </xsl:copy>
</xsl:template>

</xsl:stylesheet>

Olivier
> -----Message d'origine-----
> De : bhj@ruc.dk [mailto:bhj@ruc.dk]
> Envoyé : mardi 26 juin 2001 14:12
> À : cocoon-users@xml.apache.org
> Objet : Does cache work in Cocoon 1.8.2 on Tomcat 3.2.1?
> 
> 
> Hi,
> Does anyone have some source that gets cached by the Cocoon 
> 1.8.2 engine? If so 
> please send it to me, so I should se if it works in my 
> environment also. I have 
> been running Cocoon for some time, but have never seen the: 
> "<!-- This page was 
> served in * from cache .." - but only the "<!-- This page was 
> served in * by 
> Cocoon 1.8.2 -->" (no "from cache" ). Not even the 
> http://localhost:8080/cocoon/samples/hello/hello-page.xml 
> gets cached. My 
> cocoon.properties is below but maybe the problem is somewere 
> else. I have read 
> the "a brief guide to the cocoon cache system", and have 
> looked at some old 
> posted mails, but it didn't help me with getting the cache 
> work - I would 
> really like to see a simple exaple of a page that is cached - 
> so I will work 
> from there.
> 
> What am I doing wrong, any idea?
> 
> Thanks for any help in advance 
> /Bjarne
> 
> ##########################################
> # Cache Managers                         #
> ##########################################
> 
> # the default cache
> cache = org.apache.cocoon.cache.CocoonCache
> 
> #uncomment this to disable ALL page caching
> #cache = org.apache.cocoon.cache.NoCache
...

---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message