The script I have written allows you to update an existing cache using a feature class whose features represent the areas you wish to cache (a regularly spaced grid or other features of interest). Within the script itself you identify the location of the feature class (needs to be in the same projection as your map service), the location of the cache configuration file, and the specific update cache parameters for your cached map service (server name, service name, data frame name, scales to cache, update mode, & whether or not to use anti-aliasing).
When executed, the script will check the feature class to see if the “Cached” field exists. If it does not exist it will create the column and run update map server cache for each feature. When the update procedure for that feature finishes it will mark that feature as cached and move to the next feature. If the “Cached” field does exist, it will skip the features that have already been marked as having been cached and start up where it left off.
|