Manage Map Server Cache Tiles (Server)

Summary

Creates and updates tiles in an existing web tile layer cache. This tool is used to create new tiles, replace missing tiles, overwrite outdated tiles, and delete tiles.

Usage

  • This tool may take a long time to run for caches that cover a large geographic extent or very large map scales. If the tool is cancelled, tile creation is stopped, but the existing tiles are not deleted. This means you can cancel the tool if you run out of time and re-run it later on the same cache by setting the Update Mode parameter to Recreate Empty Tiles (update_mode="RECREATE_EMPTY_TILES" in Python).

Parameters

LabelExplanationData Type
Input Service

The web tile layer or map image layer whose cache tiles you want to update. You can choose it by browsing to the desired service in Portal or you can drag and drop a web tile layer from the Project pane Portal tab to supply this parameter.

Image Service; Map Server
Scales

A list of scale levels at which tiles will be created.

By default, the scales listed in the tool dialog are between the minimum and maximum cached scales for the service. You cannot change the cache scale range of the service with ArcGIS Pro.

Double
Update Mode

The mode for updating the cache.

  • Recreate Empty Tiles — Only tiles that are empty will be created. Existing tiles will be left unchanged. This option is not available for web tile layers published to ArcGIS Online.
  • Recreate All Tiles — Existing tiles will be replaced and new tiles will be added if the extent has changed.
  • Delete Tiles — Tiles will be deleted from the cache. The cache folder structure will not be deleted.
String
Number of caching service instances
(Optional)

Defines the number of instances that will be used to update/generate the tiles. The value for this parameter is set to unlimited (-1) and cannot be modified.

Long
Area Of Interest
(Optional)

Defines an area of interest to constrain where tiles will be created or deleted. This parameter is useful if you want to manage tiles for irregularly shaped areas. It's also useful in situations where you want to pre-cache some areas and leave less-visited areas uncached.

If you do not provide a value for this parameter, the default is to use the full extent of the map.

Feature Set
Update Extent
(Optional)

Rectangular extent at which to create or delete tiles, depending on the value of the Update Mode parameter. It is not recommended you provide values for both Update Extent and Area of Interest. If values for both parameters are provided, the value of Area of Interest will be used.

  • Default—The extent will be based on the maximum extent of all participating inputs. This is the default.
  • Current Display Extent—The extent is equal to the data frame or visible display. The option is not available when there is no active map.
  • As Specified Below—The extent will be based on the minimum and maximum extent values specified.
  • Browse—The extent will be based on an existing dataset.
Extent
Wait for job completion
(Optional)

This parameter allows you to watch the progress of the cache job running on ArcGIS Online or Portal for ArcGIS.

  • Checked—This tool will continue to run in Pro while the cache job runs on your Portal for ArcGIS or ArcGIS Online. With this option, you can request detailed progress reports at any time and view the geoprocessing messages as they appear.
  • Unchecked—This tool will submit the job to the Portal, allowing you to perform other geoprocessing tasks in ArcGIS Pro or even close it. This option is used when you choose to build a cache automatically at the time you publish the service, and you can also set this option on any other cache that you build.
Boolean
Portal URL
(Optional)

The portal URL.

String

Derived Output

LabelExplanationData Type
Output Map Service URL

The output URL.

String

arcpy.server.ManageMapServerCacheTiles(input_service, scales, update_mode, {num_of_caching_service_instances}, {area_of_interest}, {update_extent}, {wait_for_job_completion}, {portal_url})
NameExplanationData Type
input_service

The web tile layer or map image layer whose cache tiles you want to update.

Image Service; Map Server
scales
[scales,...]

The scale levels at which you will create or delete tiles when running this tool, depending on the update_mode.

Double
update_mode

The mode for updating the cache.

  • RECREATE_EMPTY_TILESOnly tiles that are empty will be created. Existing tiles will be left unchanged. This option is not available for web tile layers published to ArcGIS Online.
  • RECREATE_ALL_TILESExisting tiles will be replaced and new tiles will be added if the extent has changed.
  • DELETE_TILESTiles will be deleted from the cache. The cache folder structure will not be deleted.
String
num_of_caching_service_instances
(Optional)

Defines the number of instances that will be used to update/generate the tiles. The value for this parameter is set to unlimited (-1) and cannot be modified.

Long
area_of_interest
(Optional)

Defines an area of interest to constrain where tiles will be created or deleted. This parameter is useful if you want to manage tiles for irregularly shaped areas. It's also useful in situations where you want to pre-cache some areas and leave less-visited areas uncached.

If you do not provide a value for this parameter, the default is to use the full extent of the map.

Feature Set
update_extent
(Optional)

Rectangular extent at which to create or delete tiles, depending on the value of the update_mode parameter. It is not recommended you provide values for both update_extent and area_of_interest. If values for both parameters are provided, the value of area_of_interest will be used.

  • MAXOF—The maximum extent of all inputs will be used.
  • MINOF—The minimum area common to all inputs will be used.
  • DISPLAY—The extent is equal to the visible display.
  • Layer name—The extent of the specified layer will be used.
  • Extent object—The extent of the specified object will be used.
  • Space delimited string of coordinates—The extent of the specified string will be used. Coordinates are expressed in the order of x-min, y-min, x-max, y-max.
Extent
wait_for_job_completion
(Optional)

This parameter allows you to watch the progress of the cache job running on the Portal.

  • WAITThis tool will continue to run in the Python window while the cache job runs on Portal for ArcGIS or ArcGIS Online. With this option, you can request detailed progress reports at any time and view the geoprocessing messages as they appear. This is the default option. It is recommended that you use this option in Python scripts.
  • DO_NOT_WAITThe geoprocessing tool will submit the job to the server, allowing you to perform other geoprocessing tasks. This option is used when you choose to build a cache automatically at the time you publish the service, and you can also set this option on any other cache that you build. To track the status of the cache job, open ArcMap, right-click the service in the Catalog window, and click View Cache Status. You can also use the URL provided in the tool result message.
Boolean
portal_url
(Optional)

The portal URL.

String

Derived Output

NameExplanationData Type
out_job_url

The output URL.

String

Environments

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics