> Ard Schrijvers wrote: > >> See: http://cocoon.apache.org/2.1/userdocs/concepts/caching.html > > > > About that page, and then particularly > > > > "The Default Caching Algorithm > > > > The default algorithm uses a very easy but effective approach to > > cache a request: The pipeline process is cached up to the most > > possible point. > > > > Therefore each component in the pipeline is queried by Cocoon if it > > supports caching. Several components, like the file generator or the > > xslt transformer support caching. However, dynamic components like > > the sql transformer or the cinclude transformer do not. Let's have a > > look at some examples:" > > > > is just not right. The default algorithm for a pipeline cache either > > results the entire pipeline OR nothing of it! This is important to > > know when you are looking for performance flaws. > > Are you absolutely sure of this? I could swear I've seen > this working > as described.
Just try the following: <map:pipeline type="caching"> <map:match pattern="foo"> <map:aggregate element="root"> <map:part src="cocoon:/cached"/> </map:aggregate> <map:serialize type="xml"/> </map:match> <map:match pattern="cached"> <map:generate src="sitemap.xmap"/> <map:serialize type="xml"/> </map:match> </map:pipeline> Now calling /foo, results in two cached pipeline results (check EHDefaultStore keys with StatusGenerator) Now, clear your cache, and test the following: <map:pipeline type="caching"> <map:match pattern="foo"> <map:aggregate element="root"> <map:part src="cocoon:/cached"/> <map:part src="cocoon:/uncached"/> </map:aggregate> <map:serialize type="xml"/> </map:match> <map:match pattern="cached"> <map:generate src="sitemap.xmap"/> <map:serialize type="xml"/> </map:match> <map:match pattern="uncached"> <map:generate src="sitemap.xmap" type="jx"/> <!-- jx is uncacheable without a flow trick --> <map:serialize type="xml"/> </map:match> </map:pipeline> Running /foo again result in 1 single cached pipeline, namely cocoon:/cached. This seems to be consistent with what I wrote about the caching mechanism: A pipeline is cached if, and only if, every single component is depends on is cacheable Regards Ard > > > > > Though, the above described behavior should be enabled with > > CachingPointProcessingPipeline, but I never used it (I never had to > > either, because the point untill a pipeline is cacheable I just move > > into a seperate pipeline). Anyway, the wiki is incorrect. > > > > Regards Ard > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]