Thanks all,

The change suggested by Joerg works fine. As a result of the correspondance
my current understanding of caching pipelines, is that while caching
keys etc accumulate down the pipeline the actual data is only cached
at the end of the pipeline or after the last cache-able component.

However, while Joer's rewrite works, I would prefer to keep everything
together within the one matcher statement if possible. Is anybody able
to point me to any examples, explanations or docs on the use of
"caching-point"s in cocoon 2.1.10?

Also, while not essential for the moment, I would like to understand
how I could arrange for these and other caches to held or checkpointed
to disk. Is all this a read and understand the code exercise?



>On 10.04.2007 17:49, Grzegorz Kossakowski wrote:
>
>> Even though, all components from your pipeline are cacheable you are 
>> right. Generator is called each time you change sort order.
>> It is that way because "caching" pipeline gives "all or nothing" 
>> caching. It means that, if some component in the pipeline must be 
>> executed again it is done so for all components from the pipeline.
>
>Are you sure? I have always lived in confidence on component wise 
>caching starting at the beginning of the pipeline. If something prevents 
>using cached output of transformer 3, but all up to that one is ok, 
>cached output of transformer 2 is used. The sample seems to prove that 
>wrong. Probably it just never made a difference for us as when there was 
>something uncacheable or uncached it was the generator anyway.
>
>But what about the following change then?
>
><map:pipeline type="caching">
>    <map:match pattern="cars">
>       <map:generate type="xpathdirectory" src="{fergus:release}/cars">
>          <map:parameter name="depth" value="2"/>
>          <map:parameter name="exclude" value=".DS_Store"/>
>          <map:parameter name="xpath" 
>value="/car/colour|/car/model|/car/year"/>
>       </map:generate>
>       <map:serialize type="xml"/>
>    </map:match>
>
>    <map:match type="regexp" pattern="cars(.?sortby=(\w+))?">
>       <map:generate src="cocoon:/cars"/>
>       <map:transform type="xslt" src="xslt/carsummary1.xslt">
>          <map:parameter name="sortby" value="{2}"/>
>          <map:parameter name="sortprefix" value="sortby"/>
>          <map:parameter name="sortorder" value="sortorder"/>
>          </map:transform>
>       <map:serialize type="html"/>
>    </map:match>
></map:pipeline>
>

-- 

===============================================================
Fergus McMenemie               Email:[EMAIL PROTECTED]
Techmore Ltd                   Phone:(UK) 07721 376021

Unix/Mac/Intranets             Analyst Programmer
===============================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to