Hello,
I have an
aggregating pipeline that contains multipe steps that share a common set of
processing that I would really like cached after the first time it is run.
However, it seems as
if the contentaggregator setup method resolves all of the URI's, which ends up
calling the validatepipeline method, which fails to find a cached response for
either, since the processpipeline method is not called until generation
time.
The only thing I can
think of is changing the ContentAggregator to allow Part setup to occur at
generation time, which should allow the cached result from the shared cocoon://
call of the first aggregated component to be used in the second aggregated
pipeline.
Is there another way
to force caching of the shared pipeline? All I can think of without
writing a custom content aggregator is using a generator that will produce
cinclude markup and running the cinclude transformer as a generator for the
pipeline parts, which seems to allow caching of the cincluded pipeline, but
seems pretty ugly.
Thanks,
Roger
an
example:
<map:match pattern="processAggregate">
<map:aggregate element="product">
<map:aggregate element="product">
<!-- since
these get setup at the same time, can't take advantage of caching for the shared
component -->
<map:part src="" element="report"/>
<map:part src="" element="report"/>
</map:aggregate>
</map:match>
<map:part src="" element="report"/>
<map:part src="" element="report"/>
</map:aggregate>
</map:match>
<map:pipeline type="caching" >
<map:match pattern="someReallyComplexProcessing">
<map:generate type="cocoon://sharedProcessing" /
<transformers....
<map:match pattern="someReallyComplexProcessing">
<map:generate type="cocoon://sharedProcessing" /
<transformers....
</map:match>
<map:match pattern="someOtherProcessing">
<map:generate type="cocoon://sharedProcessing" /
<transformers....
<map:match pattern="someOtherProcessing">
<map:generate type="cocoon://sharedProcessing" /
<transformers....
</map:match>
<!-- this
seems to get run twice, since both callers get initialized simultaneously
from the contentaggregator pipeline, neither finds a cached result
-->
<map:match pattern="sharedProcessing">
<map:generate type="directory" //>
<a coupe of transformers, this is a pretty expensive step to run multiple times
<map:match pattern="sharedProcessing">
<map:generate type="directory" //>
<a coupe of transformers, this is a pretty expensive step to run multiple times
</map:match>