You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/03/05 00:36:56 UTC
svn commit: r633707 - /lenya/sandbox/modules/docustyle/sitemap.xmap
Author: andreas
Date: Tue Mar 4 15:36:53 2008
New Revision: 633707
URL: http://svn.apache.org/viewvc?rev=633707&view=rev
Log:
Setting no-cache header for authoring pages.
Modified:
lenya/sandbox/modules/docustyle/sitemap.xmap
Modified: lenya/sandbox/modules/docustyle/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/sandbox/modules/docustyle/sitemap.xmap?rev=633707&r1=633706&r2=633707&view=diff
==============================================================================
--- lenya/sandbox/modules/docustyle/sitemap.xmap (original)
+++ lenya/sandbox/modules/docustyle/sitemap.xmap Tue Mar 4 15:36:53 2008
@@ -169,13 +169,6 @@
-->
<map:match pattern="*/**.html">
- <!-- If the requested language version of the document exists, we set a last-modified header. -->
- <map:act type="language-exists">
- <map:act type="set-header">
- <map:parameter name="Last-Modified" value="{date-iso8601-rfc822:{page-envelope:document-lastmodified}}" />
- </map:act>
- </map:act>
-
<!--
HEAD requests shouldn't have all the xslt overhead, all the user wants is the HTTP header information.
So the actual content generation is bypassed.
@@ -192,8 +185,20 @@
<map:select type="parameter">
<!-- you remember that {1} is the area, right? -->
<map:parameter name="parameter-selector-test" value="{1}"/>
- <map:when test="live"/>
+ <map:when test="live">
+ <!-- If the requested language version of the document exists, we set a last-modified header. -->
+ <map:act type="language-exists">
+ <map:act type="set-header">
+ <map:parameter name="Last-Modified" value="{date-iso8601-rfc822:{page-envelope:document-lastmodified}}" />
+ </map:act>
+ </map:act>
+ </map:when>
<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:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/{2}.xml"/>
</map:otherwise>
</map:select>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org