[opencms-dev] Static export problems
Christian Steinert
christian_steinert at web.de
Mon Feb 27 23:52:50 CET 2006
The OpenCms mailing list <opencms-dev at opencms.org> schrieb am 27.02.06 19:01:16:
> Thank you Hari for your setting
>
> I have set mine up the same, but the problem is now, that it exports ALL my files each time somebody publishes something.
> Do you (or anybody else in this list) know how to avoid this? This takes a long time and needs some resources.
>
> Hope that you can help me.
Dear Corsin
well... It's not a bug, it's a feature....
As far as I have understood it, you can roughly control which resources are exported by using the <resourcesToRender> directives in the export configuration.
But as there is no mechanism for detecting, which pages will be affected by a certain content change, so OpenCms will export everything that should be rendered for your resource set.
The old strategy, from Version 5, where only changed resources where exported, doesn't exist anymore, it seems.
There are only two publish strategies in version 6:
- publish everything
or
- publish each individual page upon "file not found". Then you need a chronjob or something to remove the rendered files from time to time, so that changes from the database will eventually get through to the audience. I really find this a bit - well - uncommon to work like that, but anyway, that's the way it currently is.
To do it more effectively, would be possible by writing an own exporter. The best approach for this, I think would be if each template calls a method "addDependentResource", or something similar, for each resource that depends UPON the current resource.
Then the system would precisely know, which resources to re-publish for each changed resource, because the templates of each resource could provide this information.
But I sadly don't have the time to implement it.
-------------
If I ever use static export, I think I just try to sychronize two "independent" cms instances.
- One instance exports all changed resources upon export.
- The other instance imports anything that comes into a configured directory, checking repeatedly by using a chronjob and then publishes all the stuff.
Like that, no user would have to wait for the whole publishing process to finish.
But currently its only an idea. I don't know if I ever manage to implement that at some point.
Regards
Christian
__________________________________________________________________________
Erweitern Sie FreeMail zu einem noch leistungsstarkeren E-Mail-Postfach!
Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131
More information about the opencms-dev
mailing list