Updating a map cache |
|
Release 9.3 |
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:
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 on the Caching tab and 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.
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.
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.
For instructions on how to clear the cache, depending on which client you are using, see Using a cached map service.
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.
If you have not disabled local caching on the client, users of your cache will also be able to 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.
Once you've started adding tiles to your cache, you can add and remove scale levels using the Manage Map Server Cache Scales tool. To use this tool, follow these steps:
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 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.
In some situations, you may want to delete certain areas of tiles or even remove the entire cache.
Tip: 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.
Updating a cache uses server resources because the server is required to continually draw map tiles during the update. However, the update doesn't have to tie up your entire server. Each service has a maximum number of instances of the service that are allowed to run, which you can adjust in the Service Properties. You can also use the caching tools to specify how many of those instances will be dedicated to caching. If you're short on server resources, you can lower the number of instances dedicated to caching so that others can continue to use your service while the update occurs.
If you want others to continue using your service while you are updating, make sure that the number of instances dedicated to caching is less than the maximum allowable number of instances.