cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aurélien DEHAY ...@zorel.org>
Subject Re: Caching, auth-fw and invalidating a single entry
Date Thu, 29 Sep 2005 17:36:41 GMT
Jason Johnston a écrit :
> Aurélien DEHAY wrote:
> 
>> Hello.
>>
>> I've got 2 simples questions about the caching in Cocoon:
>> - Is the caching process aware of session
> 
> 
> AFAIK none of the default sitemap components use the session when
> computing their caching keys/validities, but it is certainly possible to
> write one that does.  I have done this myself once, by making my
> transformer's getKey() method return a string containing the session id.
> 
>> - Is this a way to invalidate a single entry in the cache?
> 
> 
> Create a condition that causes one of the components in the pipeline to
> calculate its validity as invalid, for instance touching the source XML
> file used by the generator.

Hmmmm... I'm trying to imagine a XSP/ESQL cache validity, not easy when
you have to make a request on the database. But indeed, I will try
something different.

> 
> If you're asking if there's a way to remove an entry from the cache
> programatically, it should certainly be possible but probably quite
> difficult, and probably not recommended.  Remember that caching in
> cocoon is not all-or-nothing; the SAX stream is cached up to the last
> cacheable point in the pipeline, so if a component later in the pipeline
> calculates its validity as invalid, the SAX stream created by earlier
> components may still come from the cache.  So it's not really as simple
> as just removing a single entry from the cache.
> 
>> I'm not really searching about how to achieve that, but if you have a
>> simple answer, it would be just fine.
> 
> 
> Hope that was simple enough. ;-)

Perfect, thanks.

> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message