A document has been updated:
http://cocoon.zones.apache.org/daisy/legacydocs/576.html
Document ID: 576
Branch: main
Language: default
Name: Caching (unchanged)
Document Type: Cocoon Document (unchanged)
Updated on: 7/5/06 9:01:23 AM
Updated by: ard schrijvers
A new version has been created, state: draft
Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 13953 bytes (previous version: 13930 bytes)
Content diff:
(21 equal lines skipped)
<p>The following example shows how to turn on caching for a pipeline:</p>
--- <pre>
---
+++ <pre>
<map:pipeline type="caching">
...
</map:pipeline>
(3 equal lines skipped)
<p>If you know that it doesn't make sense to turn on caching for some of
your
pipelines, put them together in their own section and use:</p>
--- <pre>
---
+++ <pre>
<map:pipeline type="noncaching">
...
</map:pipeline>
(6 equal lines skipped)
your pipeline etc. You will find in your main sitemap a section declaring
all
pipeline implementations. It's in the <em>map:components</em> section:</p>
--- <pre>
---
+++ <pre>
<map:pipes default="caching">
<map:pipe name="caching" src="..."/>
<map:pipe name="noncaching" src="..."/>
(8 equal lines skipped)
<h1>The Default Caching Algorithm</h1>
<p>The default algorithm uses a very easy but effective approach to cache a
--- request: The pipeline process is cached up to the most possible point.</p>
+++ request: The pipeline is cached if, and only if, every seperate component it
+++ depends on is cacheable.</p>
<p>Therefore each component in the pipeline is queried by Cocoon if it
supports
caching. Several components, like the file generator or the xslt transformer
(118 equal lines skipped)
just one minute, still use the <tt>expires</tt> parameter. Here is an
example:
</p>
--- <pre>
--- <map:pipeline>
+++ <pre><map:pipeline>
<map:parameter name="expires" value="access plus 1 minutes"/>
...
</map:pipeline>
(2 equal lines skipped)
<p>The value of the parameter is in a format borrowed from the Apache HTTP
module mod_expires. Examples of other possible values are:</p>
--- <pre>
--- access plus 1 hours
+++ <pre>access plus 1 hours
access plus 1 month
access plus 4 weeks
access plus 30 days
(49 equal lines skipped)
<p>You can set the default buffer size for each pipeline implementation at
the
declaration of the pipeline. Example:</p>
--- <pre>
---
+++ <pre>
<map:pipe name="noncaching" src="...">
<parameter name="outputBufferSize" value="2048"/>
</map:pipe>
(6 equal lines skipped)
<p>You can override the buffer size in each <em>map:pipeline</em>
section:</p>
--- <pre>
---
+++ <pre>
<map:pipeline type="noncaching">
<map:parameter name="outputBufferSize" value="4096"/>
...
(51 equal lines skipped)
<p>The XMLSerializer and XMLDeserialzer are two Avalon components which can
be
configured in the cocoon.xconf:</p>
--- <pre>
---
+++ <pre>
<xml-serializer
class="org.apache.cocoon.components.sax.XMLByteStreamCompiler"/>
(14 equal lines skipped)
Fields
======
no changes
Links
=====
no changes
Custom Fields
=============
no changes
Collections
===========
no changes