Updating ArcGIS Service is deleting Cache

1402
2
04-18-2016 07:34 AM
PetraWein
New Contributor

Hi,

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!

0 Kudos
2 Replies
RebeccaStrauch__GISP
MVP Esteemed Contributor

you could probably write a script to shutdown the service, delete the new cache folder and rename the old to remove the date stamp.  Should go to hard to do that (not at a machine I can try).

There are tools to help with shutdown/startup if you don't already have  a procedure with the rest API.

0 Kudos
MichaelVolz
Esteemed Contributor

What kind of changes are you making to the cached mapservice (e.g.simple data record changes or schema changes)?

If you are making simple data record changes, then maybe you need a script to capture these changes and make the changed areas into a polygon that you can you use as the Area of Interest (AOI) to update in the cache.

0 Kudos