I'm using Python to automatically update my MXD and re-publishing it on the server. For saving my settings of the service, I'm using the REST API to store them temporarly. After publishing the updated MXD I'm overwriting the settings with the stored ones using REST API. I found this procedure on some ESRI help sites.
This works great, but not if the service is cached... everytime I re-publish the MXD, ArcGIS for Server moves my cache to a new directory with a timestamp suffix. How can I tell the server to not do this? Or is there a possibility to automatically copy the cache back to the original directory?
My cache is still valid, there is no need to move it....
We are using ArcGIS for Server 10.2.2.
I hope someone can help!