cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craeg Strong <cstr...@arielpartners.com>
Subject Re: Pipeline Structure To Enable Caching of static data?
Date Wed, 24 May 2006 14:56:29 GMT
Sounds great!  yes, its very clear.  
thx,

--Craeg

Ard Schrijvers wrote:
> You seem to be quite on track: 
>
> Just remember the following simple guidelines:
>
> 1) If in a caching pipeline, cocoon tries to cache each pipeline match (thus the map:part
in an aggregator or a src="cocoon:/..." it will try to cache the seperate pipeline matches,
as well as the total)
> 2) Cocoon can ONLY cache a pipeline, if every single component is cacheable. 
>
> So, in your case, 1) will be cached, and 2) wont be cached.
>
> So the first match is on 2), cocoon cant find a cached response because not every part
of the pipeline can be cached. It will re-generate the entire pipeline, beginning with the
cocoon:/siteData. But for this cocoon:/siteData, it will find a cached pipeline result. 
>
> Hope this is clear,
>
> Regards Ard 
>
>
>   
>> Hello:
>>
>> I am returning to cocoon after a long hiatus.  My, how it has 
>> grown! :-)
>>
>> I would like to generate a single HTML webpage from multiple 
>> XML sources. 
>>
>> No problem-- use an aggregator, right?  The issue with that 
>> is some of 
>> the sources change far less frequently than others.
>>
>> I have data to construct the header and footer that won't 
>> change at all 
>> throughout the site. 
>>
>> On the other end of the spectrum, I have data that is specific to a 
>> particular page and that changes dynamically.
>>
>> I would like to cache the "per-site" data separately from the 
>> "per-major 
>> division" data separately from the "per-page" data.
>>
>> I believe the correct way to do this is via sub-pipelines, 
>> and XInclude, 
>> right?
>>
>> I can use a separate transformer for each layer and they will 
>> get cached 
>> properly, I think.  Something like:
>>
>> <!-- 1) produce an HTML fragment that does not change, and 
>> can therefore 
>> be cached -->
>> <map:match pattern="siteData">
>>    <map:generate src="content/headerAndFooterInfo.xml/>
>>     <map:transform src="stylesheets/headerFooter2html.xsl"/>
>>    <map:serialize type="xhtml"/>
>> </map:match>
>>
>> <!-- 2) fill in said HTML fragment with dynamic data that changes 
>> per-page -->
>> <map:match pattern="hello.html">
>>    <map:generate src="cocoon:/siteData"/>
>>    <map:transform src="stylesheets/helloPage.xsl">
>>       <map:parameter name="dynamic-data" 
>> value="some-uri-to-xinclude"/>
>>     </map:transform>
>>    <map:serialize type="xhtml"/>
>> </map>
>>
>> Does the above look right?  Can anyone point me to a document 
>> or example 
>> code that features multi-stage/multi-part caching?
>> I fear I may be way off-base.  Thanks in advance!
>>
>> --Craeg
>>
>>     
>
>   

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


Mime
View raw message