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 in order 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 cache properties.

Parameters

Parameter

Details

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

-p

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

-s

The URL of the site, in the format http://myserver:6080.

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

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

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

-t

Passes the token to the server when the utility is executed. If this parameter is omitted, HTTP authentication is used.

-h

Prints help for the utility.

Example

The following example defines a cache for a map service 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 -t
12/18/2014