svn commit: r589663 - in /lenya/docu/src/documentation/content/xdocs/docs/2_0_x: reference/resource-types.xml tutorials/production.xml

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Mon Oct 29 08:02:36 2007
New Revision: 589663

URL: http://svn.apache.org/viewvc?rev=589663&view=rev
Log:
Added docs about resource type expiration. This fixes bug 43097.

Modified:
    lenya/docu/src/documentation/content/xdocs/docs/2_0_x/reference/resource-types.xml
    lenya/docu/src/documentation/content/xdocs/docs/2_0_x/tutorials/production.xml

Modified: lenya/docu/src/documentation/content/xdocs/docs/2_0_x/reference/resource-types.xml
URL: http://svn.apache.org/viewvc/lenya/docu/src/documentation/content/xdocs/docs/2_0_x/reference/resource-types.xml?rev=589663&r1=589662&r2=589663&view=diff
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/docs/2_0_x/reference/resource-types.xml (original)
+++ lenya/docu/src/documentation/content/xdocs/docs/2_0_x/reference/resource-types.xml Mon Oct 29 08:02:36 2007
@@ -170,6 +170,24 @@
       (see section <em>Adding Resource Types to a Publication</em>).
     </p>
   </section>
+	  
+	  <section id="expiration">
+	    <title>Cache Expiration Time</title>
+	    <p>
+	      For each resource type, you can configure how long the documents shall be cached by
+	      the client, for instance:
+	    </p>
+	    <source xml:space="preserve"><![CDATA[<expires seconds="3600" />]]></source>
+	    <p>
+	      This value can be accessed via the <code>getExpires()</code> methods of the
+	      <code>ResourceType</code> and <code>Document</code> interfaces. You can use the
+	      header action to set the corresponding HTTP response header in your publication:
+	    </p>
+	    <source xml:space="preserve"><![CDATA[<map:act type="set-header">
+  <map:parameter name="Expires"
+    value="{date-iso8601-rfc822:{doc-info:{pubId}:{area}:{uuid}:{language}:expires}}"/>
+</map:act>]]></source>
+	  </section>
   
   <section><title>The Resource Type Definition</title>
     <p>
@@ -196,6 +214,8 @@
     <link-attribute xpath="//*[namespace-uri() = 'http://foo.bar.org/profile']/@href"/>
     
     <format name="xhtml" uri="cocoon://modules/profile/profile.xml"/>
+    
+    <expires seconds="3600" />
     
   </component-instance>
 

Modified: lenya/docu/src/documentation/content/xdocs/docs/2_0_x/tutorials/production.xml
URL: http://svn.apache.org/viewvc/lenya/docu/src/documentation/content/xdocs/docs/2_0_x/tutorials/production.xml?rev=589663&r1=589662&r2=589663&view=diff
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/docs/2_0_x/tutorials/production.xml (original)
+++ lenya/docu/src/documentation/content/xdocs/docs/2_0_x/tutorials/production.xml Mon Oct 29 08:02:36 2007
@@ -157,6 +157,10 @@
   <pipeline-expiration>access plus 2 hours</pipeline-expiration>
 </global-variables>]]></source>
         </li>
+        <li>
+          Configure the expiration time of your resource types. For more information, consult the
+          <a href="site:resource-types">resource types reference</a>.
+        </li>
         <li>Tips about Cocoon performance tuning: <a href="http://wiki.apache.org/cocoon/CocoonPerformance">http://wiki.apache.org/cocoon/CocoonPerformance</a></li>
         <li>Tips about Tomcat performance tuning: <a href="http://marc.theaimsgroup.com/?t=103598885300001&amp;r=1&amp;w=2">http://marc.theaimsgroup.com/?t=103598885300001&amp;r=1&amp;w=2</a></li>
       </ul>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.