You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jim Emerson <ji...@your.abc.net.au> on 2004/04/02 06:20:35 UTC
xml file caching
Hi All,
I'd like an example of how to cache an xml file in a pipeline, I haven't
found any examples online, the documentation helped a little but didn't
explain how to do it.
I have this in my sitemap componenents:
<map:pipes default="caching">
<map:pipe name="caching"
src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
<map:pipe name="caching-point"
src="org.apache.cocoon.components.pipeline.impl.CachingPointProcessingPipeline">
<autoCachingPoint>On</autoCachingPoint>
</map:pipe>
<map:pipe name="noncaching"
src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
</map:pipes>
And this is my pipeline:
<map:pipeline type="caching">
<map:match pattern="xsl-display-story">
<map:generate src="{defaults:story-path}{request-param:storyid}.xml"/>
<map:transform
src="{defaults:xsl-path}{request-param:gateway}_displaystory.xsl"/>
<map:parameter name="servletPath" value="{request:servletPath}"/>
<map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
<map:parameter name="contextPath" value="{request:contextPath}"/>
<map:parameter name="wwwroot" value="{defaults:www-root}"/>
<map:parameter name="docid" value="{request-param:storyid}"/>
<map:parameter name="monthdir" value="{request-param:monthdir}"/>
<map:parameter name="regname" value="{request-param:regname}"/>
<map:parameter name="regionsfile" value="{defaults:regions-file}"/>
<map:parameter name="gateway" value="{request-param:gateway}"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
I need to cache the entire transformation, and only run it again if the xml
file has been updated.
thanks
Jim Emerson
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org