You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Aurélien DEHAY <ad...@zorel.org> on 2005/09/29 11:37:27 UTC
Caching, auth-fw and invalidating a single entry
Hello.
I've got 2 simples questions about the caching in Cocoon:
- Is the caching process aware of session
- Is this a way to invalidate a single entry in the cache?
I'm not really searching about how to achieve that, but if you have a
simple answer, it would be just fine.
Thanks.
--
Aurélien DEHAY
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Caching, auth-fw and invalidating a single entry
Posted by Aurélien DEHAY <ad...@zorel.org>.
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
Re: Caching, auth-fw and invalidating a single entry
Posted by Jason Johnston <co...@lojjic.net>.
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org