You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by mi...@apache.org on 2005/02/02 23:34:43 UTC
svn commit: r151073 - in
lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default:
config/tasks/targets.xml config/tasks/tasks.xconf publication-sitemap.xmap
Author: michi
Date: Wed Feb 2 14:34:40 2005
New Revision: 151073
URL: http://svn.apache.org/viewcvs?view=rev&rev=151073
Log:
caching of default publication back ported
Modified:
lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/tasks/targets.xml
lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/tasks/tasks.xconf
lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/publication-sitemap.xmap
Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/tasks/targets.xml
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/tasks/targets.xml?view=diff&r1=151072&r2=151073
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/tasks/targets.xml (original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/tasks/targets.xml Wed Feb 2 14:34:40 2005
@@ -728,4 +728,8 @@
/>
</target>
+ <target name="deletecache">
+ <delete dir="${cachedir}"/>
+ </target>
+
</project>
Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/tasks/tasks.xconf
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/tasks/tasks.xconf?view=diff&r1=151072&r2=151073
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/tasks/tasks.xconf (original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/tasks/tasks.xconf Wed Feb 2 14:34:40 2005
@@ -27,15 +27,21 @@
<task id="publish">
<label>Publish and Export</label>
- <task id="publish" class="org.apache.lenya.defaultpub.cms.task.Publish">
+ <task id="publish" class="org.apache.lenya.defaultpub.cms.task.Publish"/>
+ <task id="delect-cache" class="org.apache.lenya.cms.task.AntTask">
+ <label>Delete Cache</label>
+ <parameter name="target" value="deletecache"/>
+ <parameter name="properties.cachedir" value="work/cache"/>
</task>
-<!-- <task id="export" class="org.apache.lenya.cms.publishing.StaticHTMLExporter">
+<!--
+ <task id="export" class="org.apache.lenya.cms.publishing.StaticHTMLExporter">
<parameter name="export-path" value="work/export/pending"/>
<parameter name="substitute-regexp" value="/lenya/default/live/"/>
<parameter name="substitute-replacement" value="/"/>
<parameter name="my-server-port" value="1313"/>
</task>
---> </task>
+-->
+ </task>
<task id="deactivateDocument" class="org.apache.lenya.defaultpub.cms.task.Deactivate">
<label>Deactivate</label>
Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/publication-sitemap.xmap
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/publication-sitemap.xmap?view=diff&r1=151072&r2=151073
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/publication-sitemap.xmap (original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/publication-sitemap.xmap Wed Feb 2 14:34:40 2005
@@ -53,9 +53,17 @@
</map:resources>
<map:pipelines>
+
+ <map:component-configurations>
+ <global-variables>
+ <cache-dir>work/cache</cache-dir>
+ </global-variables>
+ </map:component-configurations>
+
<map:pipeline>
<map:match pattern="**/">
<map:redirect-to uri="index.html"/>
+ <!--<map:redirect-to uri="{1}.html"/>-->
</map:match>
</map:pipeline>
@@ -147,12 +155,28 @@
<map:match pattern="**.html">
<map:act type="language-exists">
- <map:generate src="cocoon:/lenyabody-view/{page-envelope:publication-id}/{page-envelope:area}/{page-envelope:document-type}{page-envelope:document-url}"/>
- <map:match pattern="authoring/**.html">
- <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{../../1}.xml?doctype={page-envelope:document-type}"/>
- </map:match>
- <map:transform src="../../xslt/util/strip_namespaces.xsl"/>
- <map:serialize type="html"/>
+ <map:select type="resource-exists">
+ <map:when test="{global:cache-dir}/{../1}.html">
+ <map:read src="{global:cache-dir}/{../1}.html" mime-type="text/html"/>
+ </map:when>
+ <map:otherwise>
+ <map:generate src="cocoon:/lenyabody-view/{page-envelope:publication-id}/{page-envelope:area}/{page-envelope:document-type}{page-envelope:document-url}"/>
+ <map:match pattern="authoring/**.html">
+ <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{../../1}.xml?doctype={page-envelope:document-type}"/>
+ </map:match>
+ <map:transform src="../../xslt/util/strip_namespaces.xsl"/>
+ <map:match pattern="live/**.html">
+ <map:transform src="../../xslt/authoring/edit/addSourceTags.xsl">
+ <map:parameter name="source" value="{global:cache-dir}/live/{1}.html"/>
+ </map:transform>
+ <map:transform type="write-source">
+ <map:parameter name="serializer" value="html-no-dtd"/>
+ </map:transform>
+ <map:transform src="../../xslt/authoring/edit/removeSourceTags.xsl"/>
+ </map:match>
+ <map:serialize type="html"/>
+ </map:otherwise>
+ </map:select>
</map:act>
<!-- There is no version of the requested document-id for the
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org