Common caching questions

Below are common questions that have been asked about map and globe caching. Topics range from basic to advanced. In many cases, the answers restate information that is found elsewhere in the help. However, this topic may provide an answer to your specific question faster than searching the help.

General caching questions

Map caching questions

Globe caching questions

Why do the caching tools restart my services?

Manage Map Server Cache Tiles and other caching tools do several things behind the scenes that require restarting the service before and after the tool runs. If the caching tools alter the conf.xml tiling scheme file, restarting is required for the map service to pick up the changes. For example, if you used Manage Map Server Cache Scales to add or delete scales from your cache, restarting would be required for the map service to recognize the changes to the tiling scheme.

The service is briefly unavailable while restarting.

Why do caching tools such as Manage Map Server Cache Tiles not show the full number of instances I have designated for the CachingTools service?

For each caching job, one instance of the CachingTools service must act as the controller, distributing work to the other instances. When caching tools such as Manage Map Server Cache Tiles display the default maximum number of instances that can work on a job, they subtract one from the total available instances of CachingTools to account for this controller instance.

Thus, if your cluster is allowed to run two instances of CachingTools per GIS server machine and you have three GIS Server machines in the cluster, you have a total of 3 * 2, or 6 instances available, and the caching tools will display a default of 5 instances as the maximum that can work on any given job.

See also Allocation of server resources to caching.

How do I generate a full cache at some scales and a partial cache at other scales?

At large scales, it's often a good practice to precreate the tiles that you anticipate will be the most popular and set the rest of the tiles to be created on demand. In contrast, at small scales, you might want to create a full cache because the small scales require fewer tiles and will be frequently viewed by clients when they initially see the map.

You can run the Manage Map Server Cache Tiles tool multiple times to build a partial cache at some levels of your map and a full cache at other levels.

Suppose you have a map that you want to cache at these scales:

  • 1:128,000
  • 1:64,000
  • 1:32,000
  • 1:16,000
  • 1:8,000
  • 1:4,000

You could run Manage Map Server Cache Tiles and check only the 1:128000, 1:64000, and 1:32000 boxes. By default, the full extent of those scales will be cached.

Then you could run the tool again and check only the 1:16000, 1:8000, and 1:4000 boxes. Also, you could choose to cache these scale levels based on the extent of features in a feature class, such as a city or county boundary, instead of caching the full extent of the map. This creates a partial cache at those three scale levels. Optionally, you could choose to have the rest of the tiles at those scales be created on demand.

How do I display a "Data not available" tile for empty cache areas?

If an area of your cache does not exist, you can either create the tile on demand or configure your web server to return a "Data not available" tile. The "Data not available" tile is also useful if someone pans to the edge of the map or navigates to an area that you have not completed caching. Configuring your server to return a "Data not available" tile can in some cases yield a better user experience than returning nothing.

For REST-based applications, such as those you build with the ArcGIS APIs for JavaScript, Flex, or Silverlight, you configure a "Data not available" tile by placing an empty tile—missing.png, missing.jpg, or blank.png—at the root level of your cache. The server defaults to this tile if a tile cannot be found in the cache. Here are the instructions:

  1. Create an image of the same dimensions and image format as a tile in your tiling scheme. Name it missing.png or missing.jpg. If a clear blank tile is needed (such as for overlay services that require transparency), use blank.png instead. To download an example tile, see Esri Knowledge Base article 36939.
  2. Save the missing.png, missing.jpg, or blank.png file under the _alllayers folder for the map service, for example, C:\arcgisserver\arcgiscache\MyMapService\Layers\_alllayers\missing.png.

The server automatically handles missing tiles by replacing the expected but missing tiles with the special "missing" or "blank" tile at the root level of the cache.

How do I avoid duplicate labels in my cache?

If you are using a dynamic labeling engine in your map document to place labels (as opposed to annotation), you might occasionally see duplicate labels in your cache tiles. These should not occur any more frequently than 4,096 pixels in any direction. You can eliminate all duplicate labels by using annotation. When you use annotation, labels are associated with one point on the map and duplicates do not occur.

When creating a cache based on an area of interest, why do I see extra tiles created outside the area of interest?

To avoid duplicate labels on tiles, the caching tools originally draw areas of 4096 pixels by 4096 pixels (256 tiles of the default 256 x 256 pixel tile size), which are then cut into tiles of the size that you requested in your tiling scheme. Depending on the tiling scheme, as well as the location and shape of your area of interest, some tiles in the 4096 x 4096 area might fall outside the boundary of the area of interest. This is expected behavior. You should not see tiles created outside the boundary of your area of interest beyond 4,096 pixels in any direction.

When creating tiles on demand, why are extra tiles created outside the user's map extent?

When you request new tiles (either on demand or using the caching tools), the tiles are always created in groups. The caching mechanism will never create just one tile at a time. If it did, you would see many duplicate labels because the server would not be aware of the labels on adjacent tiles.

When you have on-demand caching enabled and you pan to an uncached area, a 4096 x 4096 pixel area is drawn by the server, then cut into tiles (this area is 2048 x 2048 when using antialiasing). Therefore, if your tiles are 256 x 256 pixels in dimension, you could expect up to 256 tiles to be created. If your map contains many layers or complex symbols, this could result in long wait times for the client.

For this reason, it's strongly recommended that you precreate tiles for popular areas of your map and use on-demand caching only in the less-popular areas. Avoid building your entire cache on demand if you have a complex source map document.

What tiling scheme should I use for globe services?

Unlike map services, all globe services use the same tiling scheme; therefore, you don't have to do anything to set up a tiling scheme for globe services. Your data is automatically cached at the levels of the built-in globe tiling scheme.

If you look closely, you can see these levels reflected in ArcGlobe or ArcGIS Explorer. As you zoom in on the globe, you'll notice that the picture gets slightly sharper or fuzzier as you pass various altitudes.

The scales in the ArcGIS Online/Bing Maps/Google Maps tiling scheme roughly match the built-in scale levels in ArcGlobe. This tiling scheme is often a good choice if you plan to drape your 2D map service over the surface of your globe. Besides the tiling scheme being ideal for appearance, ArcGlobe is engineered to draw 2D services with this tiling scheme very quickly.

12/18/2014