| <?xml version="1.0"?> |
| |
| <!--+ |
| | Event Cache Sample |
| | |
| | CVS $Id: sitemap.xmap,v 1.5 2004/02/17 00:15:21 joerg Exp $ |
| +--> |
| |
| <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> |
| <map:components> |
| <map:generators default="file"/> |
| <map:transformers default="xslt"/> |
| <map:readers default="resource"/> |
| <map:serializers default="html"/> |
| <map:matchers default="wildcard"/> |
| <map:selectors default="browser"/> |
| <map:actions> |
| <map:action name="cacheevent" src="org.apache.cocoon.acting.CacheEventAction"/> |
| </map:actions> |
| |
| <map:pipes default="caching"> |
| <!-- A pipe must be defined configured to use the EventAware cache. --> |
| <map:pipe name="event-aware" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"> |
| <parameter name="cache-role" value="org.apache.cocoon.caching.Cache/EventAware"/> |
| </map:pipe> |
| </map:pipes> |
| </map:components> |
| |
| <map:flow language="javascript"> |
| <map:script src="event.js"/> |
| </map:flow> |
| |
| <map:views> |
| <map:view from-label="content" name="content"> |
| <map:serialize type="xml"/> |
| </map:view> |
| </map:views> |
| |
| <map:pipelines> |
| <!-- Our content must occur in a pipeline configured to use our Event Aware cache --> |
| <map:pipeline type="event-aware"> |
| |
| <map:match pattern="flow"> |
| <map:call function="cacheEvent"/> |
| </map:match> |
| <map:match pattern="action"> |
| <map:act type="cacheevent"> |
| <map:parameter name="event" value="{request-param:event}"/> |
| </map:act> |
| <map:redirect-to uri="demo?pageKey={request-param:pageKey}&rand={random:x}"/> |
| </map:match> |
| <map:match pattern="*"> |
| <map:generate type="serverpages" src="eventcache.xsp"/> |
| <map:transform src="context://samples/stylesheets/dynamic-page2html.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="file" value="eventcache.xsp"/> |
| <map:parameter name="remove" value="{0}"/> |
| </map:transform> |
| <map:serialize/> |
| </map:match> |
| </map:pipeline> |
| </map:pipelines> |
| </map:sitemap> |
| |