Return-Path: Delivered-To: apmail-cocoon-docs-archive@www.apache.org Received: (qmail 36066 invoked from network); 17 Aug 2008 15:42:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Aug 2008 15:42:03 -0000 Received: (qmail 25922 invoked by uid 500); 17 Aug 2008 15:42:01 -0000 Delivered-To: apmail-cocoon-docs-archive@cocoon.apache.org Received: (qmail 25900 invoked by uid 500); 17 Aug 2008 15:42:01 -0000 Mailing-List: contact docs-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: docs@cocoon.apache.org List-Id: Delivered-To: mailing list docs@cocoon.apache.org Received: (qmail 25889 invoked by uid 99); 17 Aug 2008 15:42:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Aug 2008 08:42:01 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.67] (HELO cocoon.zones.apache.org) (140.211.11.67) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Aug 2008 15:41:13 +0000 Received: from cocoon.zones.apache.org (localhost [127.0.0.1]) by cocoon.zones.apache.org (8.13.8+Sun/8.13.8) with ESMTP id m7HFYBle010995 for ; Sun, 17 Aug 2008 15:34:11 GMT Message-ID: <2521272.1218987251076.JavaMail.daisy@cocoon.zones.apache.org> Date: Sun, 17 Aug 2008 15:34:11 +0000 (GMT+00:00) From: daisy@cocoon.zones.apache.org To: docs@cocoon.apache.org Subject: [DAISY] Updated: EventAwareCache Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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 =3D=3D=3D=3D=3D Content ------- This part has been updated. Mime type: text/xml (unchanged) File name: (unchanged) Size: 1527 bytes (previous version: 37 bytes) Content diff: ---

TODO

+++ +++ +++=20 +++

Summary

+++=20 +++

EventAwareCache is a cache, implementing the EventAware interface. I= f an +++ event occurs, it uncaches content, associated with the event by using k= eys, +++ stored in a registry.

+++=20 +++

Basic Info

+++=20 +++

Documentation

+++=20 +++

Example

+++=20 +++

To use Eventcache capabilities, you need to configure a +++ CachingProcessingPipeline, defining the eventaware cache to use.

+++=20 +++
  <map:components>
+++     <!-- Pipes definition -->
+++     <map:pipes default=3D"caching">
+++   =C2=A0=C2=A0=C2=A0 <!-- A pipe must be defined configured to use t=
he EventAware cache.-->
+++ =C2=A0=C2=A0=C2=A0 =C2=A0 <map:pipe logger=3D"core.sitemap" name=3D"=
event-aware" src=3D"org.apache.cocoon.components.pipeline.impl.CachingProce=
ssingPipeline">
+++   =C2=A0 =C2=A0=C2=A0=C2=A0 <parameter name=3D"cache-role" value=3D"=
org.apache.cocoon.caching.Cache/EventAware" />
+++ =C2=A0 =C2=A0=C2=A0=C2=A0 </map:pipe>
+++ =C2=A0=C2=A0=C2=A0 </map:pipes>
+++   </map:components>
+++=20 +++

In this example, org.apache.cocoon.caching.Cache/EventAware= 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 metho= d, +++ passing the name of an event:

+++=20 +++
<map:pipeline type=3D"event-aware">
+++=20
+++ =C2=A0 <map:match pattern=3D"action">
+++=20
+++ =C2=A0=C2=A0=C2=A0 <map:act type=3D"CacheEvent">
+++=20
+++ =C2=A0=C2=A0=C2=A0 =C2=A0 <map:parameter name=3D"event" value=3D"{re=
quest-param:event}" />
+++=20
+++ =C2=A0=C2=A0=C2=A0 </map:act>
+++=20
+++ =C2=A0=C2=A0=C2=A0 ...
+++=20
+++ =C2=A0 </map:match>
+++=20
+++ </map:pipeline>
+++=20 +++

Configuration

+++=20 +++ +++