cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lgaw...@apache.org
Subject svn commit: r447540 - in /cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF: view/caching1.jx view/caching2.jx view/caching3.jx view/caching4.jx welcome.xml
Date Mon, 18 Sep 2006 20:34:25 GMT
Author: lgawron
Date: Mon Sep 18 13:34:24 2006
New Revision: 447540

URL: http://svn.apache.org/viewvc?view=rev&rev=447540
Log:
cleanup

Modified:
    cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching1.jx
    cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching2.jx
    cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching3.jx
    cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching4.jx
    cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/welcome.xml

Modified: cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching1.jx
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching1.jx?view=diff&rev=447540&r1=447539&r2=447540
==============================================================================
--- cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching1.jx
(original)
+++ cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching1.jx
Mon Sep 18 13:34:24 2006
@@ -1,9 +1,10 @@
 <page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"  jx:cache-key="abc" jx:cache-validity="${Packages.org.apache.excalibur.source.impl.validity.NOPValidity()}">
-	<title>JX Caching</title>
+    <h4 class="samplesGroup">JXTG template caching with static cache key and NOP Validity</h4>
+	<title>Sample page</title>
 	<content>
 		<p>
 			This content has been generated at <jx:formatDate value="${java.util.Calendar.getInstance().getTime()}"
pattern="yyyy-MM-dd HH:mm:ss"/><br/>
-		</p>
+        </p>
 		<p>
 			Caching configuration is <b>jx:cache-key=&quot;abc&quot;
 			jx:cache-validity=&quot;$ {Packages.org.apache.excalibur.source.impl.validity.NOPValidity()}&quot;</b>

Modified: cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching2.jx
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching2.jx?view=diff&rev=447540&r1=447539&r2=447540
==============================================================================
--- cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching2.jx
(original)
+++ cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching2.jx
Mon Sep 18 13:34:24 2006
@@ -1,5 +1,6 @@
 <page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"  jx:cache-key="${cocoon.request.parameters.foo}"
jx:cache-validity="${Packages.org.apache.excalibur.source.impl.validity.NOPValidity()}">
-    <title>JX Caching</title>
+    <h4 class="samplesGroup">JXTG template caching with a dynamic cache key and NOP
Validity</h4>
+    <title>Single request parameter</title>
     <content>
         <p>
             This content has been generated at <jx:formatDate value="${java.util.Calendar.getInstance().getTime()}"
pattern="yyyy-MM-dd HH:mm:ss"/><br/>
@@ -18,8 +19,12 @@
         <p>
             You may try to <a href="">reload the page</a> and see if generation
date changes.<br/>
             Try other 'foo' values: <a href="?">not defined</a>, <a href="?foo=">empty</a>,
-            <a href="?foo=bar">bar</a>, <a href="?foo=zoo">zoo</a>
and watch document generation date.<br/>
-            When the 'foo' parameter is not defined the page does NOT get cached (TBD: why?).
+            <a href="?foo=bar">bar</a>, <a href="?foo=zoo">zoo</a>
and watch document generation date.
+        </p>
+        <p>
+            When the 'foo' parameter is not defined the page does NOT get cached.<br/>
+            This is because the whole cache-key has to evaluate to non null value.<br/>
+            If you to cache also this kind of request you have to modify your cache-key to
always be not null.
         </p>
 
         <p>

Modified: cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching3.jx
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching3.jx?view=diff&rev=447540&r1=447539&r2=447540
==============================================================================
--- cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching3.jx
(original)
+++ cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching3.jx
Mon Sep 18 13:34:24 2006
@@ -1,5 +1,6 @@
 <page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"  jx:cache-key="${cocoon.request.parameters.toString()}"
jx:cache-validity="${Packages.org.apache.excalibur.source.impl.validity.NOPValidity()}">
-    <title>JX Caching</title>
+    <h4 class="samplesGroup">JXTG template caching with a dynamic cache key and NOP
Validity</h4>
+    <title>All request parameters</title>
     <content>
         <p>
             This content has been generated at <jx:formatDate value="${java.util.Calendar.getInstance().getTime()}"
pattern="yyyy-MM-dd HH:mm:ss"/><br/>

Modified: cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching4.jx
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching4.jx?view=diff&rev=447540&r1=447539&r2=447540
==============================================================================
--- cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching4.jx
(original)
+++ cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/view/caching4.jx
Mon Sep 18 13:34:24 2006
@@ -1,28 +1,30 @@
 <page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"  jx:cache-key="abc" jx:cache-validity="${Packages.org.apache.excalibur.source.impl.validity.ExpiresValidity(10000)}">
-	<title>JX Caching</title>
-	<content>
-		<p>
-			This content has been generated at <jx:formatDate value="${java.util.Calendar.getInstance().getTime()}"
pattern="yyyy-MM-dd HH:mm:ss"/><br/>
-		</p>
-		<p>
-			Caching configuration is <b>jx:cache-key=&quot;abc&quot;
-			jx:cache-validity=&quot;$ {Packages.org.apache.excalibur.source.impl.validity.ExpiresValidity(10000)}&quot;</b>
-		</p>
+    <h4 class="samplesGroup">Usage of more advanced SourceValidity implementations</h4>
+    <title>ExpiresValidity</title>
+    <content>
+        <p>
+            This content has been generated at <jx:formatDate value="${java.util.Calendar.getInstance().getTime()}"
pattern="yyyy-MM-dd HH:mm:ss"/><br/>
+        </p>
+        <p>
+            Caching configuration is <b>jx:cache-key=&quot;abc&quot;
+            jx:cache-validity=&quot;$ {Packages.org.apache.excalibur.source.impl.validity.ExpiresValidity(10000)}&quot;</b>
+        </p>
 
-		<p>
-			This means that once the content is generated it expires after 10 seconds.<br/>
-			The cache key is static so there will only be one instance of cached document.<br/>
-			You may of course mix various cache key generation strategies with different validities.<br/>
-		</p>
+        <p>
+            This means that once the content is generated it expires after 10 seconds.<br/>
+            The cache key is static so there will only be one instance of cached document.<br/>
+            You may of course mix various cache key generation strategies with different
validities.<br/>
+            Choose an existing SourceValidity (<a href="http://excalibur.apache.org/apidocs/org/apache/excalibur/source/SourceValidity.html">javadoc</a>)
implementation or create your own.
+        </p>
 
-		<p>
-			You may try to <a href="">reload the page</a> and see if generation date changes.<br/>
-			You may try to <a href="?foo=bar">define additional request parameters</a>
to see that it does not change a thing.
-		</p>
+        <p>
+            You may try to <a href="">reload the page</a> and see if generation
date changes.<br/>
+            You may try to <a href="?foo=bar">define additional request parameters</a>
to see that it does not change a thing.
+        </p>
 
-		<p>
-			Next sample: none.<br/>
-			Go <a href="../">back</a> to Cocoon Template samples.
-		</p>
-	</content>
+        <p>
+            Next sample: none.<br/>
+            Go <a href="../">back</a> to Cocoon Template samples.
+        </p>
+    </content>
 </page>

Modified: cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/welcome.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/welcome.xml?view=diff&rev=447540&r1=447539&r2=447540
==============================================================================
--- cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/welcome.xml
(original)
+++ cocoon/trunk/blocks/cocoon-template/cocoon-template-sample/src/main/resources/COB-INF/welcome.xml
Mon Sep 18 13:34:24 2006
@@ -23,9 +23,9 @@
   <sample name="Back" href="..">to Cocoon Blocks Samples main page</sample>
  </group>
  <group name="Caching">
-  <sample name="Static caching" href="view/caching1">Static caching</sample>
-  <sample name="Request parameter based caching" href="view/caching2">Request parameter
based caching</sample>
-  <sample name="Caching with all request parameters" href="view/caching3">Caching with
all request parameters</sample>
-  <sample name="Using ExpiresValidity" href="view/caching3">Using ExpiresValidity</sample>
+  <sample name="Static caching" href="view/caching1">see the usage of NOPValidity with
static cache key</sample>
+  <sample name="Request parameter based caching" href="view/caching2">how to make cocoon
cache different documents basing on a single request parameter</sample>
+  <sample name="Caching with all request parameters" href="view/caching3">how to make
cocoon cache different documents basing on all request parameters</sample>
+  <sample name="Using ExpiresValidity" href="view/caching4">other type of validity
in action</sample>
  </group>
 </samples>



Mime
View raw message