Skip To Content

Manage Tile Cache


Creates a tile cache or updates tiles in an existing tile cache. You can use this tool to create new tiles, replace missing tiles, overwrite outdated tiles, and delete tiles.


  • When creating a tile cache using the manage tile cache tool, if no Area of Interest has been defined, the cache is created with the full extent of the source raster or mosaic dataset.

  • There are cases where the extent of the generated cache is larger than the Area of Interest. If this occurs, the Manage Tile Cache tool divides the data into large areas, known as supertiles, before cutting it into tiles of the size you requested. When the Input Data Source uses antialiasing, the supertile is 2,048 by 2,048 pixels; otherwise, it is 4,096 by 4,096. When the defined Area of Interest feature intersects the boundary of a supertile, that entire supertile will be created. This means you may need to zoom in before caching by a feature class can have an effect in saving time or disk space. If you have lots of areas of interest and it covers most of the Input Data Source, you might not get much benefit from caching by a feature class, because most of your features will intersect a supertile.

  • To create cache in a custom tiling scheme, make sure you have a tiling scheme defined for your source dataset before using this tool. You can use the Generate Tile Cache Tiling Scheme tool to create the tiling scheme.

  • To create a cache in an ArcGIS Online tiling scheme, specify Use ArcGIS Online scheme for the Input Tiling Scheme parameter (set tiling_scheme to ARCGISONLINE_SCHEME in Python).

  • This tool may take a long time to run for caches that cover a large geographic extent or very large scales. If the tool is canceled, tile creation is stopped, but the existing tiles are not deleted. This means you can cancel the tool at any time, and if you rerun it later on the same cache and specify Recreate empty tiles for the Manage Mode parameter, it will continue from where it left off (set manage_mode to RECREATE_EMPTY_TILES in Python).

  • This tool supports the Parallel Processing environment setting.


ManageTileCache_management (in_cache_location, manage_mode, {in_cache_name}, {in_datasource}, {tiling_scheme}, {import_tiling_scheme}, {scales}, {area_of_interest}, {max_cell_size}, {min_cached_scale}, {max_cached_scale})
ParameterExplanationData Type

The folder in which the cache dataset is created or the path to an existing tile cache.

Folder; Raster Layer

The mode for managing the cache.

  • RECREATE_ALL_TILESExisting tiles will be replaced and new tiles will be added if the extent has changed or if layers have been added to a multilayer cache.
  • RECREATE_EMPTY_TILESOnly tiles that are empty will be created. Existing tiles will be left unchanged.
  • DELETE_TILESTiles will be deleted from the cache. The cache folder structure will not be deleted.

Name of the cache dataset to be created inside the cache location.


A raster dataset or mosaic dataset to cache.

This parameter is not required when DELETE_TILES is specified in the manage_mode parameter.

Mosaic Layer; Raster Layer

An optional parameter to specify the tiling scheme.

  • ARCGISONLINE_SCHEMEUse the default ArcGIS Online tiling scheme.
  • IMPORT_SCHEMEImport an existing tiling scheme.
  • ARCGISONLINE+_SCHEMEUse the default ArcGIS Online tiling scheme with two additional levels.
  • ARCGISONLINE_ELEVATION_SCHEMEUse this tiling scheme for elevation services.
  • ARCGISONLINE_ELEVATION+_SCHEMEUse this tiling scheme to add two additional levels to an elevation service.

Path to an existing scheme file (.xml) or imported from an existing image service or map service.

Image Service; MapServer; File

The scale levels at which you will create or delete tiles when running this tool, depending on the value of the manage_mode parameter. The pixel size is represented based on the spatial reference of the tiling scheme.

  • By default, only the scales within min_cached_scale and max_cached_scale will be used when generating cache.
  • Altering the value of either the min_cached_scale or max_cached_scale parameter will change which scales are used when generating cache.
  • Scales that exist but are not within the range of min_cached_scale or max_cached_scale are ignored when generating the cache.

Defines an area of interest to constrain where tiles will be created or deleted.

It can be a feature class, or it can be a feature set that you interactively define.

This parameter is useful if you want to manage tiles for irregularly shaped areas. It's also useful in situations where you want to precache some areas and leave less-visited areas uncached.

Feature Set

The value that defines the visibility of the data source for which the cache will be generated. By default, the value is empty.

If the value is empty

  • For levels of cache that lie within the visibility ranges of the data source, the cache is generated from the data source.
  • For levels of cache that fall outside the visibility of the data source, the cache is generated from the previous level of cache.

If the value is greater than zero

  • For levels with cell sizes smaller than or equal to Maximum Source Cell Size (max_cell_size), the cache is generated from the data source.
  • For levels with cell sizes greater than Maximum Source Cell Size (max_cell_size), the cache is generated from the previous level of cache.

The unit of the Maximum Source Cell Size value should be the same as the unit of the cell size of the source dataset.


The minimum scale at which you want to create tiles. This does not have to be the smallest scale in your tiling scheme. Your minimum cache scale will determine which scales are used when generating cache.


The maximum scale at which you want to create tiles. This does not have to be the largest scale in your tiling scheme. The maximum cache scale will determine which scales are used when generating cache.


Code sample

ManageTileCache example 1 (Python window)

This is a Python sample for the ManageTileCache tool.

import arcpy
      "C:/CacheDatasets/Manage", "RECREATE_ALL_TILES", "Test",
      "C:/Data/Cache.gdb/Md", "IMPORT_SCHEME", "C:/Data/Cache.gdb/Md",
      "#", "#", "#", "40000", "2000")
ManageTileCache example 2 (stand-alone script)

This is a Python script sample for the ManageTileCache tool.

#Generate tile cache for 3 out of 5 levels defined in tiling scheme

import arcpy

folder = "C:/Workspace/CacheDatasets/Manage"
cacheName = "Test"
dataSource = "C:/Workspace/Cache.gdb/md"
method = "IMPORT_SCHEME"
tilingScheme = "C:/Workspace/Schemes/Tilingscheme.xml"
scales = "16000;8000;4000;2000;1000"
areaofinterest = "#"
maxcellsize = "#"
mincachedscale = "8000"
maxcachedscale = "2000"

       folder, mode, cacheName, dataSource, method, tilingScheme,
       scales, areaofinterest, maxcellsize, mincachedscale, maxcachedscale)


Parallel Processing Factor

If the Parallel Processing Factor value is empty (blank), the tool will run with a default value of 50 percent (one-half) of the available cores.

Licensing information

  • ArcGIS Desktop Basic: Yes
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics