ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Update Map Server Cache

  • Summary
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

Updates an existing Map Service cache to replace missing tiles, overwrite outdated tiles, or add new tiles in new areas or, in the case of a multi-layer cache, from additional layers.

Legacy:

This is a deprecated tool. Use Manage Map Server Cache Tiles instead.

Usage

  • Use Recreate Empty Tiles mode to add tiles in an extent not previously cached.

  • Use Recreate All Tiles to update outdated tiles.

  • Before running this tool, configure the Map Service to use as many instances as possible. This will dramatically decrease cache update time.

  • This tool does not accept any Environment Setting that have been specified.

Syntax

UpdateMapServerCache_server (server_name, object_name, data_frame, layer, {constraining_extent}, levels, update_mode, {thread_count}, {antialiasing}, {update_feature_class}, {ignore_status})
ParameterExplanationData Type
server_name

The host name of the ArcGIS Server to use to update the cache.

String
object_name

The name of the Map Service to use to update the cache.

String
data_frame

The map frame to cache.

String
layer
layer;layer...

Layers to remove from the cache.

String
constraining_extent
(Optional)

Extent in the cache to update.

Extent
levels
scale;scale...

A list of scale levels to update.

String
update_mode

Choose a mode for updating the cache. The two modes are:

  • Recreate Empty Tiles - Only tiles that are empty (have been deleted on disk), or that are new because the cache extent has changed or because new layers have been added to a multi-layer cache, will be created. Old tiles will be left unchanged. —Missing Value
  • Recreate All Tiles - All tiles will be replaced and new tiles will be added if the extent has changed or if layers have been added to a multi-layer cache. —Missing Value
Boolean
thread_count
(Optional)

Number of Map Server instances to use while updating the cache.

Long
antialiasing
(Optional)

Choose whether to use antialiasing when rendering the tiles. If ANTIALIASING is edges of lines, borders, and text will be smoothed. There is a performance cost for this option. No benefit will be gained on raster data.

Boolean
update_feature_class
(Optional)

A polygon feature class used to derive the extents for which the cache should be updated.

Feature Class
ignore_status
(Optional)

Choose Cache all features and ignore completion status field to ignore the cache completion status field and cache all feature extents. Choose Track cache completion status for each feature option to update the cache completion status to a field named Cached. A status of "Yes" is written to the Cached field after successful completion of cache generation for that feature.

String

Code Sample

# Script Name: Update Fused Map Server Cache
# Description: Updates a fused map server cache
# Uncomment sys.argv[] lines to accept arguments from the command line.
 
# Import standard library modules
import sys, string, os, arcgisscripting
 
# Create the Geoprocessor object
gp = arcgisscripting.create()
 
# Set the SOM server name
# Example: "mySOM"
server_name = "mySOM"
#server_name = sys.argv[1]
 
# Set the object_name
# Example: "MyServiceFolder/MyService"
object_name = "MyServiceFolder/MyService"
#object_name = sys.argv[2]
 
# Set the data frame
# Example: "Layers"
data_frame = "Layers"
#data_frame = sys.argv[3]
 
# Set the layers to cache.
# Example: "My First Layer;My Second Layer;My Third Layer"
layers = "My First Layer;My Second Layer;My Third Layer"
#layers = sys.argv[4]
 
# Set the extent to update in the cache.
# Example: "8 50 10 52"
constraining_extent = "8 50 10 52"
#constraining_extent = sys.argv[5]
 
# Set the scale levels for the cache.
# Example: "2000000;500000;250000"
scales = "2000000;500000;250000"
#scales = sys.argv[6]
 
# Set the update mode.
# Example: "Recreate Empty Tiles"
update_mode = "Recreate All Tiles"
#update_mode = sys.argv[7]
 
# Set number of instances to use while updating the cache
# Example: "3"
thread_count = "3"
#thread_count = sys.argv[8]
 
# Set antialiasing mode
# Example: "NONE"
antialiasing = "ANTIALIASING"
#antialiasing = sys.argv[9]
 
try:
    print 'Starting Cache Update'
    gp.UpdateMapServerCache(server_name, object_name, data_frame, layers, constraining_extent,  scales, update_mode, thread_count, antialiasing)
    print 'Finished Cache Update'
 
except:
    gp.AddMessage(gp.GetMessages(2))
    print gp.GetMessages(2)

Environments

This tool does not use any geoprocessing environments

Related Topics

  • An overview of the Caching toolset
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal