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.
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. ;-)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]