Skip To Content

Create Cache Schema utility

The Create Cache Schema utility allows you to define a map or image service cache from the command line, including the scales, server cache directory, DPI, tile size, tile origin, image format, and storage format. It configures everything you need to begin adding tiles; however, to create tiles, you must subsequently run the Manage Cache Tiles utility.

For help choosing the parameters for a cache, see Available map and image cache properties (for ArcMap) or Edit service caching properties in ArcGIS Server Manager.

Parameters

ParameterDetails

-u

The name of an ArcGIS Server user who will execute the utility. The user must have the appropriate level of privileges to execute the action. If your site is configured with web-tier authentication, specify a built-in user, such as the primary site administrator account.

-p

The password of the user who is specified with the -u parameter.

-s

The URL of the site, in one of the following formats:

  • http://gisserver.domain.com:6080
  • http://webadaptorhost.domain.com/webadaptorname
If your site is configured with web-tier authentication, you'll need to specify the local URL to your site.

-n

The name of the service for which you want to define a cache. This is provided using the syntax <Service name>:<Service type>.

-Dc

The ArcGIS Server cache directory to use for this service. This directory must already be registered with ArcGIS Server.

-scales

The scales that will be available for this cache, provided as a semicolon-delimited string such as "24000;12000;6000;3000". Tile creation will be allowed for all these scales; there is no way to designate the minimum and maximum cached scales using this utility. Ensure that the scales are listed from the smallest scale to largest scale.

-dpi

The resolution of the cache in pixels per inch. Often set at 96.

-TS

The dimension for a tile in pixels, provided as one of the following: 125x125 | 256x256 | 512x512 | 1024x1024.

-TO

The tile origin, which defines the upper left corner of the tiling grid. Provided as a coordinate in the format "x y". You can determine the coordinate for this point by inspecting the XMin and YMax values from your service's REST endpoint.

-TF

The tile image format, provided as one of the following: PNG | PNG8 | PNG24 | PNG32 | JPEG | MIXED.

-TC

The tile image compression quality, provided as an integer from 0 to 100, with 100 being the highest quality. This is only used with JPEG and MIXED formats.

-storage

The storage format for the cache, provided as one of the following: COMPACT | EXPLODED.

-h

Prints help for the utility.

Example

The following example defines a cache for a map service named San Diego.

<Python installation location>\python.exe "C:\Program Files\ArcGIS\Server\tools\admin\createcacheSchema.py" -u admin -p admin -s http://gisserver.domain.com:6080 -n SanDiego:MapServer -Dc "c:\arcgisserver\directories\arcgiscache" -scales "500000;250000;125000;66000;33000" -dpi 96 -TS 256x256 -TO "0 10000000" -TF MIXED -TC 90 -storage COMPACT

In this topic
  1. Parameters
  2. Example