Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

StaticPublisher - insert or update - or batch


Go to End


1257 Views

Avatar
martimiz

Forum Moderator, 1391 Posts

20 September 2009 at 2:00am

Edited: 20/09/2009 2:39am

Is it at all possible to find out if a page is being newly published or only updated?

For example: if the page is newly published I have to update the sidemenu for parent and sibblings, so that means rewriting the cache for a lot of pages, whereas on a simple update only the page itself needs to be re-cached. I'd love to use this info in my pagesAffectedByChanges() function.

[EDIT] Or would it be difficult to create a batch action just to publish static pages? Because now you have to create complex conditions in pagesAffectedByChanges() - or refresh the entire cache. I'd like to have a more resourcefriendly inbetween approach?