[opencms-dev] CmsAfterPublishStaticExportHandler writing resources unnecessarily

Christian Bjørnbak cbj at touristonline.dk
Wed Dec 4 21:09:48 CET 2013


Hi,

I want to use CmsAfterPublishStaticExportHandler in order to pre-export the
ressources so apache can serve these directly without asking opencms.

But I notice that from a publish to the online site is ready it takes 30
secs even though our installation isn't much other than the demo.

I've investigated and find that
CmsStaticExportManager.writeResource(HttpServletRequest req, String
exportPath, String rfsName, CmsResource resource, byte[] content) writes
every single resource whether it's been updated or not...

Why? Isn't the function missing a if (exportFile <
resource.getDateLastModified()) around the try catch?

The CmsStaticExportManager implementation can't be changed via
configuration only the ExportHandler, correct?

So I have to create subclass CmsAfterPublishStaticExportHandler to override
exportNonTemplateResources(CmsObject cms, List<CmsPublishedResource>
publishedResources, I_CmsReport report) in order to use a subclass of
CmsStaticExportManager?

Med venlig hilsen / Kind regards,

Christian Bjørnbak

Chefudvikler / Lead Developer
TouristOnline A/S
Islands Brygge 43
2300 København S
Denmark
TLF: +45 32888230
Dir. TLF: +45 32888235
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20131204/b79dfba5/attachment.htm>


More information about the opencms-dev mailing list