Thanks for your help. But I ran your sample-code, and it works fine but the 
page is NOT cached on my system - it outputs the HTML and this:

"<!-- This page was served in 187 milliseconds by Cocoon 1.8.2 -->"

So it was "served in", not "served from cache" - so any idea of why this works 
on your machine but not on my machine? On you system the text is "served form 
cache" - right?

I have tried this om Windows 2000 and Windows 98.

Thanks in advance
/Bjarne

Quoting JEULIN Olivier <[EMAIL PROTECTED]>:

> 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 : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Envoyé : mardi 26 juin 2001 14:12
> > À : [EMAIL PROTECTED]
> > 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: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 

---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to