RE: Does cache work in Cocoon 1.8.2 on Tomcat 3.2.1?
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-formattype=text/html/xsl:processing-instruction html headtitleCHAINAGE/title/head body xsl:apply-templates/ /body /html /xsl:template xsl:template match=a|b|c prexsl:value-of select=name()/ non traité/pre xsl:apply-templates/ /xsl:template xsl:template match=p prexsl: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]
RE: Does cache work in Cocoon 1.8.2 on Tomcat 3.2.1?
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-formattype=text/html/xsl:processing-instruction html headtitleCHAINAGE/title/head body xsl:apply-templates/ /body /html /xsl:template xsl:template match=a|b|c prexsl:value-of select=name()/ non traité/pre xsl:apply-templates/ /xsl:template xsl:template match=p prexsl: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]
RE: Does cache work in Cocoon 1.8.2 on Tomcat 3.2.1?
Yup, ...served from cache in 1 ms... My advices are: 1) (how could I forget this one) clear your browser's cache... ! I've try it right now: IE was reading the old file. I bet 1 euro on this one ;) 2) if you have invalidated the cache while developping you app., restart cocoon to be sure the new config file is loaded, and... that you're editing the good one :) (in the WEB-INF of tomcat). 3) ... err ... blow up the all thing :) Ol' -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Envoyé : mardi 26 juin 2001 15:49 À : [EMAIL PROTECTED] Objet : RE: Does cache work in Cocoon 1.8.2 on Tomcat 3.2.1? 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 - 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]
RE: Does cache work in Cocoon 1.8.2 on Tomcat 3.2.1?
Thank you very much. Now I managed to get the from cache in the bottom :-) In IE5.5 it is not enough to left-shift and reload - you have to use the menu: InternetOptions/DeleteFiles - now I know that. But why can the same page NOT be cached in both IE and Netscape? I understand that the page could use a different stylseheet in Netscape than IE and therefore the cache has to get recalculated - so we have one cache for Netscape and another cache for IE. But only one of the browsers can get a cache copy of the page - this is the browser that asks for the page first time after the server is started. So is this normal behavior of Cocoon cache? If this is correct the cache in Cocoon 1.8.2 do only work for ONE device! Thanks in advance /Bjarne Quoting JEULIN Olivier [EMAIL PROTECTED]: Yup, ...served from cache in 1 ms... My advices are: 1) (how could I forget this one) clear your browser's cache... ! I've try it right now: IE was reading the old file. I bet 1 euro on this one ;) 2) if you have invalidated the cache while developping you app., restart cocoon to be sure the new config file is loaded, and... that you're editing the good one :) (in the WEB-INF of tomcat). 3) ... err ... blow up the all thing :) Ol' -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Envoyé : mardi 26 juin 2001 15:49 À : [EMAIL PROTECTED] Objet : RE: Does cache work in Cocoon 1.8.2 on Tomcat 3.2.1? 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 - 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]
RE: Does cache work in Cocoon 1.8.2 on Tomcat 3.2.1?
You're right, it doesn't work. You've found a bug :-/ I haven't found it in the bug database (but you may want to check again; see it in the 'bug database' section of cocoon's homepage). I'll let you submit it, to take ll credit for it... Fame starts small ;) -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Envoyé : mardi 26 juin 2001 17:27 À : [EMAIL PROTECTED] Objet : RE: Does cache work in Cocoon 1.8.2 on Tomcat 3.2.1? Thank you very much. Now I managed to get the from cache in the bottom :-) In IE5.5 it is not enough to left-shift and reload - you have to use the menu: InternetOptions/DeleteFiles - now I know that. But why can the same page NOT be cached in both IE and Netscape? I understand that the page could use a different stylseheet in Netscape than IE and therefore the cache has to get recalculated - so we have one cache for Netscape and another cache for IE. But only one of the browsers can get a cache copy of the page - this is the browser that asks for the page first time after the server is started. So is this normal behavior of Cocoon cache? If this is correct the cache in Cocoon 1.8.2 do only work for ONE device! Thanks in advance /Bjarne snip! - 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]