cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jestel, Roger B. (LNG-ALB)" <>
Subject caching in contentaggregator
Date Tue, 03 Jun 2003 00:13:54 GMT
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.  
an example:
<map:match pattern="processAggregate">
    <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="cocoon:/someReallyComplexProcessing" element="report"/>
     <map:part src="cocoon:/someOtherProcess that shares a base step with
the first" element="report"/>
<map:pipeline type="caching" >
   <map:match pattern="someReallyComplexProcessing">
    <map:generate type="cocoon://sharedProcessing" /
   <map:match pattern="someOtherProcessing">
    <map:generate type="cocoon://sharedProcessing" /
<!-- 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 

View raw message