Delete Map Server Cache (Server) |
|
Release 9.2
Last modified November 22, 2006 |
![]() ![]() ![]() Print all topics in : "Tools" |
Deletes an existing Map Service cache including all associated files on disk.
This is an unrecoverable operation so only use if you are sure you no longer need the cache.
Usage tips
If there is more than one data frame in the cache directory only the active data frame of the specified Map Service will be removed.
If there is only one data frame in the cache directory the entire directory will be removed.
After this tool runs the Map Service will be restarted.
This tool does not accept any Environment Setting that have been specified.
Command line syntax
An overview of the Command Line window
DeleteMapServerCache_Server <server_name> <object_name> <data_frame> <layer;layer...>
Parameter | Explanation | Data Type |
<server_name> |
The host name of the ArcGIS Server serving the cache to delete. |
String |
<object_name> |
The name of the Map Service from which to delete the cache. |
String |
<data_frame> |
The map frame in the cache that will be deleted. This is here for informational purposes only and cannot be changed. |
String |
<layer;layer...> |
Choose the layers to delete from the cache. Layers that are checked will be removed from the cache. All others will be saved. It is only possible to delete individual layers if the cache is a multi-layer cache. |
String |
DeleteMapServerCache "myHost" "myMapService" "Layers" "Cities;Roads;Parcels"
Scripting syntax
About getting started with writing geoprocessing scripts
DeleteMapServerCache_Server (server_name, object_name, data_frame, layer)
Parameter | Explanation | Data Type |
server_name (Required) |
The host name of the ArcGIS Server serving the cache to delete. |
String |
object_name (Required) |
The name of the Map Service from which to delete the cache. |
String |
data_frame (Required) |
The map frame in the cache that will be deleted. This is here for informational purposes only and cannot be changed. |
String |
layer (Required) |
Choose the layers to delete from the cache. Layers that are checked will be removed from the cache. All others will be saved. It is only possible to delete individual layers if the cache is a multi-layer cache. |
String |
# Script Name: Update Map Server Cache # Description: Deletes a map server cache # Import standard library modules import sys, string, os, arcgisscripting # Create the Geoprocessor object gp = arcgisscripting.create() # Set the SOM server name server_name = "mySOM" # Set the object_name object_name = "MyServiceFolder/MyService" # Set the data frame data_frame = "Layers" # Set the layers to cache layers = "My Layer1;Another Layer;A Last Layer" try: print 'Starting Cache Deletion' gp.DeleteMapServerCache(server_name, object_name, data_frame, layers) print 'Finished Cache Deletion' except: gp.AddMessage(gp.GetMessages(2)) print gp.GetMessages(2)