cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobia <tobia.confo...@linux.it>
Subject Re: Proper way to cache pipelines with SQL Transformer?
Date Thu, 10 Jan 2008 17:59:53 GMT
Peter Wyngaard wrote:
> The external pipelines that invoked these internal pipelines with a  
> "cocoon:" URL passed their request parameters along.

This happens because a non-raw internal request (cocoon: schema) does  
not create a new Request object (or RequestWrapper or something like  
that) and it is actually quite a useful property.

For example, suppose you need to gather some data about the request  
not explicitly present in the request itself.  Maybe you need to issue  
a set of queries based on the URI path, to obtain one or more IDs of  
the objects being referred to, or of the user making the request, or  
some such.

Then you would like to store those IDs and misc attributes somewhere  
and access them during the rest of the request processing, however  
complex that might be.  I find request attributes (don't confuse with  
parameters) to be an excellent place for this sort of thing.

They live in Cocoon's request object, so they have the same lifetime  
of the initial HTTP request.  Which happens to be less than that of  
the session, but more than the internal sub-request, as an external  
request might generate many internal redirects and Cincludes, all  
using the cocoon: schema.  Unless you purposefully make a raw sub- 
request, and until the initial request processing is over, all sub- 
requests will be able to see the request attributes, because they  
share the request object.


HTH
Tobia

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


Mime
View raw message