I'm using the API to set some values for node pickers against some nodes. This works great and in the back office I can see the values have been assigned.
My problem is that these values won't show up in my templates as they are missing from the XML cache file.
I set the property value through the API and then call SaveAndPublishWithStatus on the node. Once I've finished with all nodes I've tried deleting the cache file and the following lines to force the XML cache file to be generated:
Regenerating cache through the API
I'm using the API to set some values for node pickers against some nodes. This works great and in the back office I can see the values have been assigned.
My problem is that these values won't show up in my templates as they are missing from the XML cache file.
I set the property value through the API and then call SaveAndPublishWithStatus on the node. Once I've finished with all nodes I've tried deleting the cache file and the following lines to force the XML cache file to be generated:
I've also tried the following line which falls over with an error:
It's an Umbraco 7.3.4 site. Can somebody please explain how I would programatically rebuild the cache through the API.
It turns out you can't clear the cache from the console. What you need to do is use the WebApi and you can rebuild the cache from there.
https://our.umbraco.org/forum/developers/api-questions/39164-Console-Application-Publishing-Problem#comment-189720
is working on a reply...