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>  &lt;map:components&gt;
+++     &lt;!-- Pipes definition --&gt;
+++     &lt;map:pipes default="caching"&gt;
+++       &lt;!-- A pipe must be defined configured to use the EventAware cache.--&gt;
+++       &lt;map:pipe logger="core.sitemap" name="event-aware" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"&gt;
+++         &lt;parameter name="cache-role" value="org.apache.cocoon.caching.Cache/EventAware" /&gt;
+++       &lt;/map:pipe&gt;
+++     &lt;/map:pipes&gt;
+++   &lt;/map:components&gt;</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>&lt;map:pipeline type="event-aware"&gt;
+++ 
+++   &lt;map:match pattern="action"&gt;
+++ 
+++     &lt;map:act type="CacheEvent"&gt;
+++ 
+++       &lt;map:parameter name="event" value="{request-param:event}" /&gt;
+++ 
+++     &lt;/map:act&gt;
+++ 
+++     ...
+++ 
+++   &lt;/map:match&gt;
+++ 
+++ &lt;/map:pipeline&gt;</pre>
+++ 
+++ <p>Configuration</p>
+++ 
+++ </body>
+++ </html>