cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reinhard Haller" <reinhard.hal...@interactive-net.de>
Subject cache policy
Date Sat, 06 Aug 2005 13:17:33 GMT
Hi,

I'm using a multistage pipeline to create webpages
with cocoon 2.1.7.

The longest pipeline involves news messages. The
messages themselves are retrieved by a cron job every 4 hours
and stored in local directories.

To get them displayed I use the following pipeline:

<!-- aggregate page template with page content elements -->

	<map:match pattern="*.html">
		<map:aggregate element="page">
			<map:part src="template.xml" />
			<map:part src="source/{1}.xml" />
		</map:aggregate>
		<map:transform src="template2xml.xslt">
			<map:parameter name="path" value="{1}" />
			<map:parameter name="base"
value="http://localhost:8888/xmlweb/" />
			<map:parameter name="buildDate"
value="{date:yyyy-MM-dd'T'HH:mm:ssZ}" />
		</map:transform>
		<map:transform type="cinclude" />
		<map:transform src="stripnamespaces.xslt" />
		<map:serialize type="xhtml-iso-latin" />
	</map:match>

<!-- include content elements like keywords, news etc. -->

	<map:match pattern="*.raw-content">
		<map:generate src="source/{1}.xml" />
		<map:transform src="raw-content2xml.xslt" >
			<map:parameter name="path" value="{1}" />
		</map:transform>
		<map:transform type="cinclude" />
		<map:serialize type="xml" />
	</map:match>

<!-- finalize content elements to html-snippets -->

	<map:match pattern="*.content">
		<map:generate src="cocoon:/{1}.raw-content" />
		<map:transform src="content2xml.xslt" >
			<map:parameter name="path" value="{1}" />
		</map:transform>
		<map:transform src="stripnamespaces.xslt" />
		<map:serialize type="xml" />
	</map:match>

<!-- get news items and collect them as requested by params -->

	<map:match pattern="news.xml">
		<map:generate type="directory" src="rss">
			<map:parameter name="dateFormat"
value="yyyy-MM-dd'T'HH:mm:ss"/>
			<map:parameter name="include"
value=".\.channel$"/>
		</map:generate>
		<map:transform src="rssitems.xslt" >
			<map:parameter name="category"
value="{request-param:category}" />
			<map:parameter name="source"
value="{request-param:source}" />
		</map:transform>
		<map:transform type="cinclude" />
		<map:transform src="rss-itemsort1.xslt" >
			<map:parameter name="count"
value="{request-param:count}" />
			<map:parameter name="days"
value="{request-param:days}" />
			<map:parameter name="buildDate"
value="{date:yyyy-MM-dd'T'HH:mm:ssZ}" />
		</map:transform>
		<map:transform src="stripduplicates.xslt" />
		<map:transform src="rsschannel.xslt">
			<map:parameter name="buildDate"
value="{date:yyyy-MM-dd'T'HH:mm:ssZ}" />
			<map:parameter name="actDate" value="{date:dd
MMM yyyy HH:mm:ss Z}" />
		</map:transform>
		<map:serialize type="xml"/>
	</map:match>

If the pipeline is declared of type "noncaching" the delivery takes
about 
30 seconds to filter out 20 news messages of a selected category and
message age out of ca. 2000 messages and render them to a html-page.

If the pipeline is declared of type "caching" the delivery is
immediate, but
cocoon doesn't take care, if there are new messages stored in the
directories.
It makes no difference if the browser requests a fresh copy or not.

Is there a command to specifically invalidate a pipeline or document
cache
after the cron job has updated the directory?

Thanks
Reinhard


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message