You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tilman Rassy <ra...@math.TU-Berlin.DE> on 2006/05/08 14:39:52 UTC

Caching and actions: execution order

Hello,

I have a question concerning the order of execution of the act method of an 
action and the isValid and getKey methods of cacheable components. Consider a 
pipeline of the following form:

<map:match ...>
  <map:act ...>
    <map:generate .../>
    <map:transform .../>
    <map:serialize .../>
  </map:act>
  <map:read .../>
</map:match> 

Assume the generater, transformer, and reader are all cacheable. Is then first 
the act method of the action called, and are then the isValid and getKey 
methods called, or are the latter called first?

Thanks in advance,
Tilman

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


Re: Caching and actions: execution order

Posted by Tilman Rassy <ra...@math.TU-Berlin.DE>.
On Tuesday 09 May 2006 04:48, Jason Johnston wrote:
> Tilman Rassy wrote:
> > Hello,
> >
> > I have a question concerning the order of execution of the act method of
> > an action and the isValid and getKey methods of cacheable components.
> > Consider a pipeline of the following form:
> >
> > <map:match ...>
> >   <map:act ...>
> >     <map:generate .../>
> >     <map:transform .../>
> >     <map:serialize .../>
> >   </map:act>
> >   <map:read .../>
> > </map:match>
> >
> > Assume the generater, transformer, and reader are all cacheable. Is then
> > first the act method of the action called, and are then the isValid and
> > getKey methods called, or are the latter called first?
>
> That is correct, the act method has to be called first because its
> return value (Map or null) determines whether the sub-components are
> part of the pipeline at all.  It's very much like a matcher in that
> respect.

Thanks, that is what I expected!

Tilman

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


Re: Caching and actions: execution order

Posted by Jason Johnston <co...@lojjic.net>.
Tilman Rassy wrote:
> Hello,
> 
> I have a question concerning the order of execution of the act method of an 
> action and the isValid and getKey methods of cacheable components. Consider a 
> pipeline of the following form:
> 
> <map:match ...>
>   <map:act ...>
>     <map:generate .../>
>     <map:transform .../>
>     <map:serialize .../>
>   </map:act>
>   <map:read .../>
> </map:match> 
> 
> Assume the generater, transformer, and reader are all cacheable. Is then first 
> the act method of the action called, and are then the isValid and getKey 
> methods called, or are the latter called first?

That is correct, the act method has to be called first because its
return value (Map or null) determines whether the sub-components are
part of the pipeline at all.  It's very much like a matcher in that respect.

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