cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: Caching output from xpathdirectory generator
Date Tue, 10 Apr 2007 19:27:09 GMT
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>

Does this end in a cached internal pipeline?

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message