You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by da...@cocoon.zones.apache.org on 2008/08/17 17:34:11 UTC
[DAISY] Updated: EventAwareCache
A document has been updated:
http://cocoon.zones.apache.org/daisy/documentation/1492.html
Document ID: 1492
Branch: main
Language: default
Name: EventAwareCache (unchanged)
Document Type: Cocoon Document (unchanged)
Updated on: 8/17/08 3:34:05 PM
Updated by: Lukas Lang
A new version has been created, state: draft
Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 1527 bytes (previous version: 37 bytes)
Content diff:
--- <html><body><p>TODO</p></body></html>
+++ <html>
+++ <body>
+++
+++ <h1>Summary</h1>
+++
+++ <p>EventAwareCache is a cache, implementing the EventAware interface. If an
+++ event occurs, it uncaches content, associated with the event by using keys,
+++ stored in a registry.</p>
+++
+++ <h1>Basic Info</h1>
+++
+++ <h1>Documentation</h1>
+++
+++ <h3>Example</h3>
+++
+++ <p>To use Eventcache capabilities, you need to configure a
+++ CachingProcessingPipeline, defining the eventaware cache to use.</p>
+++
+++ <pre> <map:components>
+++ <!-- Pipes definition -->
+++ <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></pre>
+++
+++ <p>In this example, <em>org.apache.cocoon.caching.Cache/EventAware</em> is the
+++ identifier of a the Spring bean, which takes care of actions. Next, we define an
+++ action in our pipeline section, calling the CacheEvent bean's act method,
+++ passing the name of an event:</p>
+++
+++ <pre><map:pipeline type="event-aware">
+++
+++ <map:match pattern="action">
+++
+++ <map:act type="CacheEvent">
+++
+++ <map:parameter name="event" value="{request-param:event}" />
+++
+++ </map:act>
+++
+++ ...
+++
+++ </map:match>
+++
+++ </map:pipeline></pre>
+++
+++ <p>Configuration</p>
+++
+++ </body>
+++ </html>