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

Syntax

ManageMapServerCacheTiles(input_service, scales, update_mode, {num_of_caching_service_instances}, {area_of_interest}, {update_extent}, {wait_for_job_completion}, {portal_url})
ParameterExplanationData Type
input_service

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

Image Service; MapServer
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.

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