Is it possible to hook into the 'Republish entire site' event?
At the moment I'm hooking into various events using the method described here. However I've noticed there doesn't seem to be an event for the republishing of the entire site. Is there any way I can hook into this event?
Hi, Alimac why do you need to hook into this event? All that is happening is the xml is getting removed and regenerated? Perhaps there is another way of doing what you want to do :).
Sorry I don't think there is an event for the 'Republish entire site'. Only after a single document cache has been updated. Like Hendy said that's the umbraco.content.AfterUpdateDocumentCache event, but it's still being fired and can be used. There isn't an alternative for that yet even though you might get some deprecated messages from the old Document api.
For individual publishes I normally also use the ContentService.Publishing event, but in this situation I needed to make sure the xml cache was updated which was in the AfterUpdateDocumentCache event.
Sorry to reactivate this discussion but is there a way to refresh the cache and/or republish the entire site without logging in to the admin area.
The reason for asking is dealing with site deployments and potentially needing to flush the cache once a deployment has been made and ideally wanting to automate the process.
you could pub this inside an Umbrao WebApi controller , then call it remotely on the site to kick off a republish (security concerns aside).
you could look at using something like Chauffeur - and write a deliverable for it, that would do a republish all, then you could call something from the command line (i would guess that this would be quite slow however)
Is it possible to hook into the 'Republish entire site' event?
At the moment I'm hooking into various events using the method described here. However I've noticed there doesn't seem to be an event for the republishing of the entire site. Is there any way I can hook into this event?
Thanks
Hi, Alimac why do you need to hook into this event? All that is happening is the xml is getting removed and regenerated? Perhaps there is another way of doing what you want to do :).
Charlie
Hi, does anyone know if this is possible ? (our use-case would be to flush an object cache when a user clicks "Republish entire site")
There was an event umbraco.content.AfterUpdateDocumentCache, but this doesn't seem to be fired anymore.
I'm actually in the same position as Hendy: We want to update our object cache on the site republish...
Hello,
Sorry I don't think there is an event for the 'Republish entire site'. Only after a single document cache has been updated. Like Hendy said that's the umbraco.content.AfterUpdateDocumentCache event, but it's still being fired and can be used. There isn't an alternative for that yet even though you might get some deprecated messages from the old Document api.
Jeroen
Thanks Jeroen, unfotunately AfterUpdateDocumetCache doesn't seem to be being fired in Umbraco v7.2.1
I've got a website running on 7.2.1 where it does get fired. After a node has been saved and published. It's one of the last event's that get's fired.
Jeroen
Arrh, I was trying with "Republish entire site", (for individual publishes I'm using the ContentService.Publishing event)
Guess as hacky fix to get the "Republish entire site" to fire an event, we could use a FileSystemWatcher on the umbraco.config file ?
For individual publishes I normally also use the ContentService.Publishing event, but in this situation I needed to make sure the xml cache was updated which was in the AfterUpdateDocumentCache event.
Jeroen
Hi,
We found an event to hook into that will fire whenever the content cache is updated (which includes "Republish entire site")
HTH,
Hendy
Hey
Sorry to reactivate this discussion but is there a way to refresh the cache and/or republish the entire site without logging in to the admin area.
The reason for asking is dealing with site deployments and potentially needing to flush the cache once a deployment has been made and ideally wanting to automate the process.
Cheers, Nigel
Hi
It looks like the republish is within the content service so I think you would need to write some code to call RepublishAll, from the content Service
so probibly
you could pub this inside an Umbrao WebApi controller , then call it remotely on the site to kick off a republish (security concerns aside).
you could look at using something like Chauffeur - and write a deliverable for it, that would do a republish all, then you could call something from the command line (i would guess that this would be quite slow however)
is working on a reply...