Map cache updates

When you create a map cache, you are creating a snapshot, or picture, of your map at the time you create the cache. When you edit or update the data, two things need to happen before others can see the changes:

  1. You have to update the cache.
  2. People who have used the cache need to delete any outdated tiles that may be stored on their machines. This is clearing the cache.

Updating your cache

Updating the cache involves re-creating some or all of the tiles in your cache. You can update the cache using the Manage Map Server Cache Tiles tool. A simple way to access this tool is to open the Service Properties dialog box, click the Caching tab, then click Update Tiles. Once the tool opens, find the Update Mode and choose Recreate All Tiles.

If you want to only update tiles in a certain rectangular area of the map, you can change the default Update Extent, which is the extent of the entire service.

If you know that features in only one dataset or one geographic area have changed, you can check the option to Update specific areas using a feature class. With this option, the tool re-creates only the tiles that cover the features of a feature class that you supply. This works well if you've edited polygon data. For example, if you have a cache covering the entire United States and you just edited the national park boundaries, you can choose Update specific areas using a feature class and supply the national parks feature class. Only tiles in the national parks will be re-created.

Manage Map Server Cache Tiles tool.

Filling in empty tiles

If you want to complete a partially created cache or perform a quality check on your cache, run Manage Map Server Cache Tiles with the Update Mode set to Recreate Empty Tiles. This setting checks the folders of your cache and creates any tiles that are missing. As with the other Update Modes, you can set a rectangular extent or a feature class as boundaries for creating empty tiles.

In the image below, all tiles outlined in blue would be created using Recreate Empty Tiles.

Illustration indicating which tiles would be re-created as defined in the Recreate Empty Tiles option.

Deleting tiles

In some situations, you may want to delete certain areas of tiles or even remove the entire cache.

  • To delete a specific area of tiles, run the Manage Map Server Cache Tiles tool with the Update Mode set to Delete Tiles. Before executing the tool, set the Update Extent to the area that you want to delete. You can alternatively specify a feature class to spatially designate which tiles will be deleted from the cache.
  • To delete the entire cache, open the Service Properties dialog box, click the Caching tab, then click Delete Cache. This runs the Delete Map Server Cache tool, which removes all tiles and folders associated with the cache.
TipTip:

To delete all tiles but leave the folder structure and tiling scheme, run the Manage Map Server Cache tool with the Update Mode set to Delete Tiles. Before executing the tool, ensure that the Update Extent is set at the full extent of the map.

Changing the scales in your cache

If you want to add or remove scales from your cache tiling scheme, use the Manage Map Server Cache Scales tool. This simple tool allows you to choose a map service and define its set of scales, adding or deleting scales as necessary.

Scripting update tools

You can run Manage Map Server Cache Tiles automatically on a regular basis through scripting. This is useful if you have editors that are constantly updating the data. For further information and examples of how to automate your cache updates, see Automating cache creation and updates with geoprocessing.

Clearing local caches on the client

When displaying cached map services, ArcGIS clients store tiles locally so that they don't have to be retrieved again when the user navigates back to the area. Even when you've updated your cache, people who have used your cache before may have some of the tiles stored locally on their machines. They need to clear their cache to see your changes.

If you frequently update your cache, consider disabling the option for clients to cache tiles locally. This way, you know that those who use your cache will always see the most up-to-date tiles instead of older tiles that might be stored on their machines.

The Caching tab in the Map Service Properties dialog box.

If you have not disabled local caching on the client, users of your cache can choose whether to cache tiles locally or not. They can choose to continually build the local cache, build a new local cache for each application session, or build no local cache at all.

Dedicating server resources to the update

Updating a cache uses server resources because the server is required to continually draw map tiles during the update. The most scalable solution is to perform the update on a staging server, then copy the updated tiles to your production server.

If a staging server is not available, the next best option is to perform your update during periods of low traffic, such as on nights or weekends. If you still don't want your entire set of CPU resources dedicated to the update, you can lower the Number of MapServer Instances when you run the Manage Map Server Cache Tiles tool. This parameter sets the number of map service instances (ArcSOC.exe processes) that are allowed to create tiles while the tool is running. Use Windows Task Manager or Windows Performance Monitor to ensure that your CPU is not being completely utilized by ArcSOC.exe processes during the cache update.

Note that lowering the number of instances allowed to work on an update causes the update to take longer. If you are short on hardware, you may have to make a decision that sacrifices cache availability for cache update speed, or vice versa.


11/18/2013