cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30356] - CIncludeTransformer + event aware caching
Date Thu, 12 Aug 2004 10:01:45 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30356>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30356

CIncludeTransformer + event aware caching





------- Additional Comments From unico@hippo.nl  2004-08-12 10:01 -------
Well, since you didn't respond to my request I finally did without and checked
out what you did. 

First of all looking at CIncludeTransformer I have to say that I don't
understand why it is doing its own caching. Caching should be the concern of
pipelines and sources. If you want preemptive loading of cached content this
would much better be implemented as a Source wrapper. In fact we now have such a
class in the scratchpad area.

One unpleasant implication of the current design is that as an unsuspecting user
of this class, when you turn on caching in this transformer, the cached contents
of any included cocoon:// source that identifies a caching pipeline would be
cached twice! Once by the pipeline itself and once by the CIncludeTransformer.

Now concerning your patch. I don't quite understand why you retain the validity
of the cached contents. The algorithm the caching pipeline uses to determine the
validity of the cached contents is as follows: first it looks at the validity of
the cached pipeline contents itself, then if the validity by itself indicates it
needs a current validity to check against then the pipeline contructs a pipeline
validity by calling the participating components' getValidity() methods. If your
component now returns the same validity object that you previously returned then
 that does not make much sense to me.

Since I really needed this functionality myself and I didn't have enough time to
discuss and refactor the CIncludeTransformer I implemented my own very basic
IncludeTransformer that does exactly what I need, no more no less. I'll post it
here if anyone want to use it.

I also looked at the XIncludeTransformer to see if I could implement caching in
that one instead. But it seems that the XIncludeTransformer reads included
content from URL objects instead of from Source objects.

Mime
View raw message