You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by David LAGARDERE <dl...@yahoo.fr> on 2002/09/13 21:54:27 UTC

CaheValidity & toString()

Hello.

Sorry if the following was documented. However, after
many hours I spent on it, I found interesting to
describe what I've found about Caching.

I would like to have your opinion on a solution I've
found to my troubles with Cacheability of aggregated
content (see the previous mails I've sent).

The problem I had was the fact that Cocoon didn't
cache a StreamPipeline containing an aggregator
composed of my own Cacheable Generator : the log
told me the TimeStamp Validity of the Pipeline changed
everytime I requested the page whereas my generator
was always valid !

As each part of an aggregator is a SitemapSource
instance, the key and the validity of the pipeline are
built upon the SitemapSource last modification date.
This date is the concatenation of the Pipeline Cached
Key string value and the Pipeline Validity string
value. 
The Pipeline Validity is a Map which associate a
Component Cached Key with its validty. Its string
representation is the string representation of each
pair {key, value}, that is , a call to the toString()
method on both Component cached key and Component
validity objects. 
As a consequence, every validity may overload the
toString() method returning a relevant value otherwise
the returned value will be the memory address of the
object, which of course, can't be taken as a relevant
value.

Please tell me if I'm wrong, but this is the only way
I've found to have my CachingStreamPipeline cached !


David Lagardere


___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: CaheValidity & toString()

Posted by Vadim Gritsenko <va...@verizon.net>.
David LAGARDERE wrote:

>Hello.
>
>Sorry if the following was documented. However, after
>many hours I spent on it, I found interesting to
>describe what I've found about Caching.
>
>I would like to have your opinion on a solution I've
>found to my troubles with Cacheability of aggregated
>content (see the previous mails I've sent).
>
>The problem I had was the fact that Cocoon didn't
>cache a StreamPipeline containing an aggregator
>composed of my own Cacheable Generator : the log
>told me the TimeStamp Validity of the Pipeline changed
>everytime I requested the page whereas my generator
>was always valid !
>
>As each part of an aggregator is a SitemapSource
>instance, the key and the validity of the pipeline are
>built upon the SitemapSource last modification date.
>This date is the concatenation of the Pipeline Cached
>Key string value and the Pipeline Validity string
>value. 
>The Pipeline Validity is a Map which associate a
>Component Cached Key with its validty. Its string
>representation is the string representation of each
>pair {key, value}, that is , a call to the toString()
>method on both Component cached key and Component
>validity objects. 
>As a consequence, every validity may overload the
>toString() method returning a relevant value otherwise
>the returned value will be the memory address of the
>object, which of course, can't be taken as a relevant
>value.
>
>Please tell me if I'm wrong, but this is the only way
>I've found to have my CachingStreamPipeline cached !
>

You got it right.

Vadim


>David Lagardere
>  
>





---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>