[opencms-dev] Static export problems
Jonathan Woods
jonathan.woods at scintillance.com
Tue Feb 28 09:24:03 CET 2006
Oops. Isn't what I've suggested already achieved by using
CmsAfterPublishStaticExportHandler? If you used that _without_ the
<resourcestorender> stuff, wouldn't that give you what you wanted?
Jon
_____
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Jonathan Woods
Sent: 28 February 2006 08:13
To: 'The OpenCms mailing list'
Subject: RE: [opencms-dev] Static export problems
Corsin, Christian -
The approach I was thinking of was this:
- use the handler404/on demand approach for all resources to be exported
- on module start-up, register a listener to CmsEvents
- include in the module a class which uses intimate knowledge of my
templating approach to be able to return for any given module-controlled VFS
resource a list of resources affected by a change
- handle CmsEvents to delete the RFS copies of all relevant resources so
determined
But as Christian says, it takes time...
Jon
_____
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Corsin Camichel
Sent: 28 February 2006 07:04
To: The OpenCms mailing list
Subject: Re: [opencms-dev] Static export problems
Hi Christian
Thank you for your response.
The "publishing all" is no option for me, we have to export more than 5'000
files every time.
Another solution I see, is to create an OpenCms Cronjob/Scheduled Job with
the " org.opencms.scheduler.jobs.CmsStaticExportJob" class.
If that is not satisfying, I have to deactivate the static export and keep
everything in the database.
Thank you again
Regards
-- Corsin
On 2/27/06, Christian Steinert <christian_steinert at web.de> wrote:
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
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev
--
Corsin Camichel
cocaman at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060228/3580f4cf/attachment.htm>
More information about the opencms-dev
mailing list