Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Server toolbox > Caching toolset > Tools

Delete Map Server Cache (Server)

Release 9.2
Last modified November 22, 2006
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

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

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
Data types for geoprocessing tool parameters


Command line example

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

Data types for geoprocessing tool parameters


Script example

# 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)

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.