Common caching questions

Release 9.3 E-mail This Topic Printable Version Give Us Feedback

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

General caching questions

Map caching questions

Globe caching questions

General 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 a restart of the service before and after the tool runs. For example, before creating tiles, Manage Map Server Cache Tiles extends the timeout value of the service to avoid timeouts during large caching jobs, then after the tiles are created it sets the timeout length back to the original value.

Also, if the caching tools alter the conf.xml tiling scheme file, a restart is required in order 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, a restart would be required for the map service to recognize the changes to the tiling scheme.

The service will be briefly unavailable during the restart.

Map caching questions

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 pre-create 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 in order 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:

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

Then, you could run the tool again and check only the boxes for 1:16000, 1:8000, and 1:4000. 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.

What's the best way to generate the cache at only a few of the scales in my tiling scheme?

The Manage Map Server Cache Tiles tool lists all of the scales in your tiling scheme, with checkboxes next to each one. If you only want to generate a cache at a few of the levels in your tiling scheme, uncheck the scales that you do not want to cache before you execute the tool.

Building a cache at only a subset of the levels of your tiling scheme is a common workflow when overlaying caches with ArcGIS Online services, Microsoft Virtual Earth, or Google Maps. In many cases you may want to overlay your data with these base maps, but you may not have the time or disk space to match all of the scales that those services use. You can use the same tiling scheme as these services and just uncheck the large scales before you run the tool.

Remember: Removing scales from the tiling scheme is different from leaving a scale level empty. Avoid removing scales directly from the ArcGIS Online, Virtual Earth, or Google Maps tiling schemes. Instead, just leave the large scales empty if necessary.

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

To display the tile, you need to create a custom error response on your virtual cache directory for HTTP Error 404: "Not Found". Instead of an error message, the Web server returns the tile.

IIS instructions:

  1. Open Windows Control Panel and click Administrative Tools > Internet Information Services (IIS) Manager
  2. Navigate to the virtual cache directory and find the folder containing your map cache. Right-click the folder and click Properties.
  3. Click the Custom Errors tab, scroll down, and select the 404 error code.
  4. Click the Edit button. In the URL box, specify the tile that IIS should return whenever a tile is missing. Use a relative URL and not just a path to a file.
  5. Click OK to dismiss the dialogs.

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 may occasionally see duplicate labels in your cache tiles. These should not occur any more frequently than 4096 x 4096 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.

The above recommendation applies to fused caches. When you use multi-layer caches, labels are not included in the cached images. The labels are drawn dynamically on top of the cached images. If you are using multi-layer caches with the 9.2 .NET Web ADF, you will probably see many duplicate labels because a dynamic set of labels is drawn for each tile. This behavior has been improved in the 9.3 .NET Web ADF; however, for performance reasons you should generally only use multi-layer caches with ArcMap as a client.

When creating a cache based on a feature class boundary, why do I see extra tiles created outside the features?

To avoid duplicate labels on tiles, the caching tools originally draw areas of 4096 pixels by 4096 pixels (64 tiles of the default 512 by 512 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 feature class, some tiles in the 4096 x 4096 area might fall outside the boundary of the feature class. This is expected behavior. You should not see tiles created outside the boundary of your feature class beyond 4096 pixels in any direction.

When creating tiles on demand, why do extra tiles get 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. Therefore if your tiles are 512 x 512 you could expect up to 64 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.

Globe caching questions

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 will automatically be 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.

Did you know? The scale levels of the ArcGIS Online tiling scheme were chosen to correspond with the built-in levels of the globe tiling scheme. This is because all 3D ArcGIS Online services were created by overlaying a 2D map service on the surface of the globe.