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?)


Nick





On Fri, 2002-04-26 at 09:27, Carsten Ziegeler wrote:
> If you know the key of the cached response, you could remove it
> from the cache:
> You can lookup the Store containing the cached responses - the
> role for this is Store.TRANSIENT_CACHE - and then remove it by
> hand.
> 
> Carsten
> 
> > -----Original Message-----
> > From: Nick Airey [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, April 26, 2002 10:13 AM
> > To: [EMAIL PROTECTED]
> > Subject: Programmatic invalidation of cache
> > 
> > 
> > 
> > This is reposted to dev list because there was no answer on the users
> > list. 
> > 
> > 
> > -----Forwarded Message-----
> > 
> > From: Nick Airey <[EMAIL PROTECTED]>
> > To: Cocoon Users <[EMAIL PROTECTED]>
> > Subject: Programmatic invalidation of cache
> > Date: 25 Apr 2002 17:29:55 +0100
> > 
> > Hello everyone, 
> > 
> > I have some custom generators which are working well, and are caching
> > according to various strategies, as implemented in CacheValidity
> > objects. 
> > 
> > Is it possible to programatically invalidate the cache for a particular
> > generator/key combination?
> > 
> > 
> > For instance, I am caching some data under a "long" representing a user
> > session id. When the user logs out, that user session id could be
> > reassigned to the next new user. Obviously any data cached under this
> > number must be removed from the cache as the old guy leaves.
> > 
> > Perhaps I could explicitly put null data into it, but I think it's
> > cleaner if there is a hook which allows me to kill the cache for that
> > key.
> > 
> > Any ideas?
> > 
> > Nick
> > 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > 
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail: <[EMAIL PROTECTED]>
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to