-<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
-<!--
+
    | Event Cache Sample
    |
    | CVS $Id: sitemap.xmap 433543 2006-08-22 06:22:54Z crossley $
    +
-->
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-<map:components>
-<map:generators>
<map:generator name="sample" src="org.apache.cocoon.samples.EventAwareGenerator"/>
</map:generators>
-<map:readers>
<map:reader name="sample" src="org.apache.cocoon.samples.EventAwareReader"/>
</map:readers>
-<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 logger="core.sitemap" 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="reader">
-<map:read type="sample" src="eventcache.xml">
<map:parameter name="DELAY_SECS" value="4"/>
</map:read>
</map:match>
-<map:match pattern="*">
-<map:generate type="sample" src="eventcache.xml">
<map:parameter name="DELAY_SECS" value="4"/>
<map:parameter name="DATE" value="{date:date}"/>
<map:parameter name="KEY" value="{request-param:pageKey}"/>
</map:generate>
-<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>