cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <>
Subject RE: Programmatic invalidation of cache
Date Fri, 10 May 2002 11:12:55 GMT
> -----Original Message-----
> From: Nick Airey []
> Sent: Friday, May 10, 2002 1:00 PM
> To:
> Subject: RE: Programmatic invalidation of cache
> Hello Carsten, sorry to resurrect a lonh dead thread, but I am about to
> implement this, and I would really appreciate a little more info about
> how to do it.
> Problem: I want to remove the cache of pipeline "user" under key "1".
> This code is going in an action class which runs on a different pipeline
> (not user), but which must invalidate the user pipeline, prompting the
> user pipeline to refresh itself from the database.
> So I first I need to get the store.
> Store store = (Store) manager.lookup(Store.TRANSIENT_CACHE);
> Is this the store for all pipelines? (and I must then get the "user"
> one), or is this the store for "user"? (if so, how does it decide to
> give me that one?)
Hi Nick,

the above store is used for the caching of all requests (and for other
purposes as well).

A response is stored inside the cache under a compound key. This key
is assembled by the different pipeline components (generator, transformers
The URI of the pipeline does not play a role in here!.

So, assuming a Pipeline with G->T1->T2->S and all four components cacheable
the key is build by getting the key from each component (G, T1, T2, S) and
then a string is build with exactly this information (see the and for more

So if you want to delete a cached response, you have to emulate this
of the key, and remove the object stored under this key from the store.

But be warned that you use implementational details for this that might
change from one version of cocoon to another, so the building of the key
might be different in a future release.


Carsten Ziegeler               S&N AG, Germany - Open Source Group
The Cocoon Book:

To unsubscribe, e-mail:
For additional commands, email:

View raw message