I would like to make work this simple idea, when an URI (**.html) is requested for the first time, it's generated and a file is written somewhere ; otherwise, cocoon cache handle. I have implemented a bad patch of my own, directly on pipeline, but if an action can do the job...
I should explain a real life situation. Authors are working on their lan, there's no server admin to keep a cocoon runing on the Internet but static http is possible (IIS :o( ). So, the cocoon is used as a lan production tool for HTML (and other formats).
IMO, you'd better use Cocoon's CLI which is exactly suited for this job.
Not exactly, but I should. The problem is, it wasn't working with my app (xsp) on cocoon2.1.3, I will test with cocoon2.1.5
For cocoon-users and the archives of this list :
I ask you if I have to double each pipe you answer me this simple piece of code copy/paste here for everyone
<map:match pattern="_production/**"> <map:mount src="dynamic.xmap" uri-prefix="_production"/> </map:match>
<map:match pattern="**">
<map:select type="resource-exists">
<map:parameter name="prefix" value="generated/{0}">
<map:when test="">
<!-- nothing to do, file already generated -->
</map:when>
<map:otherwise>
<!-- generate -->
<map:act type="copy-source" src="cocoon:/_production/{0}">
<map:parameter name="dest" value="generated/{0}"/>
</map:act>
</map:otherwise>
</map:select>
<map:read src="generated/{0}"/>
</map:match>Very nice. Could be an idea of a sitemap configurable filesystem cache. The problem is ---v
Note however, that once generated, the document validity will *never* be checked unless the generated file is deleted.
That's what my patched pipeline do, but not enough generic to be commited to cocoon.
Thanks a lot to have explain more the "copy-source" action.
--Fr�d�ric
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
