Scott Payne wrote:

Hi,

I'm taking up a thread about caching of generated XSPs started at
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=107880112301284&w=2.



Snippet from this link:

<map:match pattern="page-*.xsp">
<map:generate src="page.xsp" type="serverpages"/>
<map:transform src="generate-xsp.xsl"/>
<map:serialize type="xml"/> </map:match>


<map:match pattern="page-*">
<map:generate src="cocoon:/page-{1}.xsp" type="serverpages"/>
<map:transform src="tohtml.xsl"/>
<map:serialize type="html"/> </map:match>




I've ported the patches in
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26725 to the 2.1.5 source
but we still seem to have a bit of a bottle-neck.

Although the new EnvironmentWrapper now has a getLastModified() method, the
lastModified field is only set by the isResponseModified() method, which
doesn't seem to be called for the generated content. Therefore the
getLastModified() method always returns 0, and the java file always gets
regenerated.

So, my question is, has anyone tried to get this working without the
regeneration? Is there somewhere appropriate we should set the lastModified
time for the SitemapSource instance representing the generated XSP?



Looking at the sitemap snippet above, the answer is, page.xsp should be cacheable, and I guess it is not cacheable at the moment. See XSP examples for the details.


Vadim



Reply via email to