svn commit: r611215 - /lenya/sandbox/pubs/docu/sitemap.xmap

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Fri Jan 11 08:03:17 2008
New Revision: 611215

URL: http://svn.apache.org/viewvc?rev=611215&view=rev
Log:
Removed caching from docu sitemap

Modified:
    lenya/sandbox/pubs/docu/sitemap.xmap

Modified: lenya/sandbox/pubs/docu/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/sitemap.xmap?rev=611215&r1=611214&r2=611215&view=diff
==============================================================================
--- lenya/sandbox/pubs/docu/sitemap.xmap (original)
+++ lenya/sandbox/pubs/docu/sitemap.xmap Fri Jan 11 08:03:17 2008
@@ -344,21 +344,6 @@
           </map:when>
         </map:select>          
       
-        <!--
-           Lenya provides its own caching mechanism. There is a source writing transformer that will store rendered pages
-           in {global:cache-dir}. Hence we should first check for every request if a cached version already exists, before
-           starting the actual rendering process.
-           NOTE: the cache is disabled by default. That means it has seen very little testing. And it does not do proper cache
-           invalidation, so it's probably only useful as a quick performance hack on a mostly static site.
-        -->
-        <!-- do we have this request in the cache? -->
-        <map:select type="resource-exists">
-          <map:when test="context:/lenya/pubs/{page-envelope:publication-id}/{global:cache-dir}/{1}/{2}.htmlDISABLED">
-            <!-- YES. Just read it from the cache and be done: -->
-            <map:read src="context:/lenya/pubs/{page-envelope:publication-id}/{global:cache-dir}/{1}/{2}.html" mime-type="text/html"/>
-          </map:when>
-          <!-- No. Generate the page and write it to the cache. -->
-          <map:otherwise>
             <!-- 
                FIXME: the "rendertype" parameter is a hack for BXE and should be handled by the bxe module. 
                Moreover, it doesn't make much sense to cache documents in the authoring area that are about to be edited anyway.
@@ -375,78 +360,46 @@
               </map:otherwise>
             </map:select>
 
-                <!-- Menu generation -->
-                <map:select type="parameter">
-                  <!-- you remember that {1} is the area, right? -->
-                  <map:parameter name="parameter-selector-test" value="{1}"/>
-                  <map:when test="live">
-                    <!-- do nothing for live -->
-                  </map:when>
-                  <map:otherwise>
-                    <!-- for all other areas, we want a GUI menu (handled by global-sitemap.xmap -->
-                    <!-- FIXME: the ?doctype parameter doesn't seem to be used (see global-sitemap.xmap). -->
-                    <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/{2}.xml?doctype={page-envelope:document-type}"/>
-                    <!-- 
-                       external broken link reporting (pretty much untested) 
-                       TODO: External Links checking should be optional on a document by document basis.
-                    -->
-                    <!--
-                    <map:transform src="fallback://lenya/xslt/authoring/addJavaScript.xsl">
-                      <map:parameter name="scriptSRC" value="/modules/linkcheck/linkreporter.js"/>
-                    </map:transform>
-                    -->
-                  </map:otherwise>
-                </map:select>
-
+            <!-- Menu generation -->
+            <map:select type="parameter">
+              <!-- you remember that {1} is the area, right? -->
+              <map:parameter name="parameter-selector-test" value="{1}"/>
+              <map:when test="live">
+                <!-- do nothing for live -->
+              </map:when>
+              <map:otherwise>
+                <!-- for all other areas, we want a GUI menu (handled by global-sitemap.xmap -->
+                <!-- FIXME: the ?doctype parameter doesn't seem to be used (see global-sitemap.xmap). -->
+                <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/{2}.xml?doctype={page-envelope:document-type}"/>
                 <!-- 
-                   strip xhtml namespace prefix to ensure compatibility with non-XML conformant browsers
-                   workaround to avoid empty script, style and textarea tags (firefox chokes on those)
+                   external broken link reporting (pretty much untested) 
+                   TODO: External Links checking should be optional on a document by document basis.
                 -->
-                <map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/>
-
-
-                <!-- Cache writing -->
-                <map:select type="parameter">
-                  <map:parameter name="parameter-selector-test" value="{1}"/>
-                  <!-- for live area: -->
-                  <map:when test="live">
-                    <!-- prepare content for source writing transformer -->
-                    <map:transform src="fallback://lenya/xslt/authoring/edit/addSourceTags.xsl">
-                      <map:parameter name="source" value="context:/lenya/pubs/{page-envelope:publication-id}/{global:cache-dir}/{1}/{2}.html"/>
-                    </map:transform>
-                    <map:transform type="write-source">
-                      <map:parameter name="serializer" value="xhtml"/>
-                    </map:transform>
-                    <!-- remove the source writing transformer cruft again before serving the page -->
-                    <map:transform src="fallback://lenya/xslt/authoring/edit/removeSourceTags.xsl"/>
-                    <!-- set cache expiration header according to resource type configuration (<expires/>) -->
-                    <map:act type="set-header">
-                      <map:parameter name="Expires" value="{date-iso8601-rfc822:{doc-info:{page-envelope:publication-id}:{page-envelope:area}:{page-envelope:document-uuid}:{page-envelope:document-language}:expires}}"/>
-                    </map:act>
-                  </map:when>
-                  <!-- for other areas -->
-                  <map:otherwise>
-                    <!-- tell the browser not to cache stuff so that the user always sees up-to-date content -->
-                    <map:act type="set-header">
-                      <map:parameter name="Cache-Control" value="no-cache" />
-                      <map:parameter name="Pragma" value="no-cache"/>
-                    </map:act>
-                  </map:otherwise> 
-                </map:select>
-
-                <!-- the proxy transformer handles proxy-related URL rewriting -->
-                <map:transform type="proxy"/>
+                <!--
+                <map:transform src="fallback://lenya/xslt/authoring/addJavaScript.xsl">
+                  <map:parameter name="scriptSRC" value="/modules/linkcheck/linkreporter.js"/>
+                </map:transform>
+                -->
+              </map:otherwise>
+            </map:select>
 
-            <map:act type="language-exists">
-              <map:serialize type="xhtml"/>
-            </map:act>
             <!-- 
-               When the requested document does not exist, we generate a nice error page.
-               Still, it's not what the user wants, so make sure we send a 404 "not found".
+               strip xhtml namespace prefix to ensure compatibility with non-XML conformant browsers
+               workaround to avoid empty script, style and textarea tags (firefox chokes on those)
             -->
-            <map:serialize type="xhtml" status-code="404"/>
-          </map:otherwise>
-        </map:select>
+            <map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/>
+
+            <!-- the proxy transformer handles proxy-related URL rewriting -->
+            <map:transform type="proxy"/>
+
+        <map:act type="language-exists">
+          <map:serialize type="xhtml"/>
+        </map:act>
+        <!-- 
+           When the requested document does not exist, we generate a nice error page.
+           Still, it's not what the user wants, so make sure we send a 404 "not found".
+        -->
+        <map:serialize type="xhtml" status-code="404"/>
 
       </map:match>
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.