You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by rf...@apache.org on 2008/09/16 23:41:15 UTC

svn commit: r696079 - /lenya/site/docu20/tutorials/production-checklist.html

Author: rfrovarp
Date: Tue Sep 16 14:41:15 2008
New Revision: 696079

URL: http://svn.apache.org/viewvc?rev=696079&view=rev
Log:
Fixed caching section to show how to stop eternal caching

Modified:
    lenya/site/docu20/tutorials/production-checklist.html

Modified: lenya/site/docu20/tutorials/production-checklist.html
URL: http://svn.apache.org/viewvc/lenya/site/docu20/tutorials/production-checklist.html?rev=696079&r1=696078&r2=696079&view=diff
==============================================================================
--- lenya/site/docu20/tutorials/production-checklist.html (original)
+++ lenya/site/docu20/tutorials/production-checklist.html Tue Sep 16 14:41:15 2008
@@ -17,12 +17,12 @@
       </a>
     </p><p>
       <img alt="Built with Apache Lenya" src="../../index/banners/builtWithApacheLenya.png" />
-    </p></div></div><div id="body"><h1>Production Checklist</h1><div class="tocTitle"><div>Table of Contents</div></div><ul class="toc"><li><a href="#N10012">General Deployment Recommendations</a></li><li><a href="#N10030">During Development</a></li><li><a href="#N10045">Preparation (Internal Pilot Phase)</a></li><li><a href="#N10068">Caching in Cocoon</a></li><li><a href="#N1009F">Performance Tuning</a></li><li><a href="#N100EB">General Measures for Production</a></li><li><a href="#N10124">Cosmetics</a></li></ul><p>
+    </p></div></div><div id="body"><h1>Production Checklist</h1><div class="tocTitle"><div>Table of Contents</div></div><ul class="toc"><li><a href="#N1000F">General Deployment Recommendations</a></li><li><a href="#N1002D">During Development</a></li><li><a href="#N10042">Preparation (Internal Pilot Phase)</a></li><li><a href="#N10065">Caching in Cocoon</a></li><li><a href="#N100A0">Performance Tuning</a></li><li><a href="#N100EC">General Measures for Production</a></li><li><a href="#N10125">Cosmetics</a></li></ul><p>
       Here's a list of points you should take care of when running Lenya
       in a production environment. It covers only the most obvious aspects,
       but it might prevent you from falling in the biggest traps in
       first real-world project.
-    </p><a name="N10012" />
+    </p><a name="N1000F" />
       <h2>General Deployment Recommendations</h2>
       <ul>
         <li>
@@ -50,7 +50,7 @@
           deploy an un-tagged development version.
         </li>
       </ul>
-    <a name="N10030" />
+    <a name="N1002D" />
       <h2>During Development</h2>
       <ul>
         <li>
@@ -70,7 +70,7 @@
           parameters). 
         </li>
       </ul>
-    <a name="N10045" />
+    <a name="N10042" />
       <h2>Preparation (Internal Pilot Phase)</h2>
       <p>
         Set the log level to <em>ERROR</em> in
@@ -97,7 +97,7 @@
         &lt;property name="debug" value="off"/&gt;
 </pre>
       
-    <a name="N10068" />
+    <a name="N10065" />
       <h2>Caching in Cocoon</h2>
       <p>
         There's a <a href="http://wiki.apache.org/cocoon-data/attachments/GT2006Notes/attachments/10-caching.pdf">great
@@ -105,11 +105,12 @@
       </p>
       <p>
         Cocoon's default store implementation is an in-memory store backed by a disk
-        store (based on EHCache). You can configure this store using a file called
-        <code>ehcache.xml</code> which is located in <code>org/apache/cocoon/components/store/impl/ehcache.xml</code>.
-        The default entries of the <code>defaultCache</code> are as follows:
+        store (based on EHCache). The <code>ehcache.xml</code> file provides the default settings. However,
+        Cocoon's configuration of its cache is controled by the <code>cocoon.xconf</code> file in the 
+        <code>&lt;store logger="core.store"&gt;</code> stanza. 
+        The options under Cocoon are as follows:
       </p>
-      <pre class="source">&lt;defaultCache
+      <pre class="source">
     maxElementsInMemory="10000"
     eternal="true"
     timeToIdleSeconds="0"
@@ -117,7 +118,8 @@
     overflowToDisk="true"
     diskPersistent="true"
     diskExpiryThreadIntervalSeconds="120"
-    /&gt;</pre>
+    memoryStoreEvictionPolicy="LRU"
+    </pre>
       <p>
         So, when <code>overflow-to-disk</code> is set to true, <code>eternal</code> to true and
         <code>timeToIdleSeconds=0</code>, then once a cachekey is in memory/disk, it will never
@@ -125,23 +127,23 @@
         (see also thread: <a href="http://java2.5341.com/msg/170235.html">http://java2.5341.com/msg/170235.html</a>).
       </p>
       <p>
-        For production use these setting should be changed. A possible configuration might look like:
-      </p>
-      <pre class="source">&lt;defaultCache
-    maxElementsInMemory="10000"
-    eternal="false"
-    timeToIdleSeconds="1800"
-    timeToLiveSeconds="3600"
-    overflowToDisk="true"
-    diskPersistent="true"
-    diskExpiryThreadIntervalSeconds="120"
-    /&gt;</pre>
+        For production use these setting should be changed. See <a href="http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/store/impl/EHDefaultStore.html#parameterize(org.apache.avalon.framework.parameters.Parameters)">
+        Cocoon's EHDefaultStore javadoc</a> for all available options and parameter naming,
+        as names differ from ehcache parameter names. A possible configuration might look like:
+      </p>
+      <pre class="source">&lt;store logger="core.store"&gt;
+    &lt;parameter name="maxobject" value="${store.maxobjects}"/&gt;
+    &lt;parameter name="use-cache-directory" value="true"/&gt;
+    &lt;parameter name="eternal" value="false"/&gt;
+    &lt;parameter name="timeToIdleSeconds" value="1800"/&gt;
+    &lt;parameter name="timeToLiveSeconds" value="3600"/&gt;
+    &lt;/store&gt;</pre>
       <p>
         This cache contains a maximum in memory of 10000 elements, and will expire an element
         if it is idle for more than 30 minutes and lives for more than 60 minutes. If there are
         more than 10000 elements it will overflow to the disk cache.
       </p>
-    <a name="N1009F" />
+    <a name="N100A0" />
       <h2>Performance Tuning</h2>
       <p>
         The following hints can be considered to improve the performance of your application:
@@ -180,7 +182,7 @@
         You might want to disable the transformation for maximum speed:
       </p>
       <pre class="source">&lt;map:transform src="fallback://lenya/modules/prettyprinting/xslt/xml2nicexml.xsl"/&gt;</pre>
-    <a name="N100EB" />
+    <a name="N100EC" />
       <h2>General Measures for Production</h2>
       <ul>
         <li>
@@ -219,7 +221,7 @@
           exported version of the site ready.
         </li>
       </ul>
-    <a name="N10124" />
+    <a name="N10125" />
       <h2>Cosmetics</h2>
       <p>
         In order to hide the default publication from the welcome page



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org