I am running into this same problem (I think) but I'm confused as to what to do about it.
I have xsp's with generateKey() and generateValidity()methods, and when I put the xsp in an aggregate, cocoon re-aggregates every time, instead of used the cached aggregated value. The symptom is that it says that the TimeStamp Validity is not the same for my aggregated component. I'm using my own CacheValidity, which does have a toString() method. I've tried replacing my xsp with the cacheable.xsp from the cocoon sample application, and I get the same problem--the aggregate isn't cached. Is there some other method I need to implement somewhere? Thanks, Steve > -----Original Message----- > From: David LAGARDERE [mailto:dlagardere@;yahoo.fr] > Sent: Friday, September 13, 2002 3:54 PM > To: [EMAIL PROTECTED] > Subject: 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: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > > --------------------------------------------------------------------- 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>