Working with the feature cache

If you're working with data stored in a geodatabase, creating a feature cache can often speed up common ArcMap tasks. The feature cache allows you to temporarily store the features in the current map display in ArcMap in your local machine's memory. Because retrieving the features from local memory is a fast operation, using the feature cache will often result in performance improvements.

The feature cache only stores features in geodatabases (and ArcIMS feature services). The feature cache is most useful when you are working within a specific area of a map.

For example, if you are working with data in an ArcSDE geodatabase that serves features over a network, features in the current extent must be retrieved from the source database each time your display is updated. Using a feature cache reduces the load on your network and the geodatabase since ArcMap accesses this information from your computer's memory (RAM). Since features are cached on the client, it reduces the number of queries the client needs to execute on the server.

Some of the activities that can often benefit from a feature cache include drawing large or complex datasets, labeling, editing, selecting features, retrieving the same features for multiple layers on a map, and drawing features using a definition query. Labeling, for example, can be a slow and costly process, requiring multiple round-trips to the data source as the label engine attempts to place the maximum number of labels on the map.

Learn more about labels

Using the feature cache tools

ArcMap has tools to help you build and work with the feature cache. These tools are found on the Feature Cache toolbar.

Feature Cache toolbar

Button

Name

Function

Build Feature Cache

Build Feature Cache

Builds a cache of the features in the current map extent

Empty Feature Cache

Empty Feature Cache

Empties the feature cache

Toggles Auto-Cache

Toggles Auto-Cache

Toggles the automatic creation of the map's feature cache

Set Auto-Cache Scale

Set Auto-Cache Scale

Sets the maximum scale for automatically creating the map cache

Clear Auto-Cache Scale

Clear Auto-Cache Scale

Clears the automatic cache maximum scale

Show Feature Cache

Show Feature Cache

Displays the extent of the feature cache

Zoom to Feature Cache

Zoom to Feature Cache

Zooms the map to the extent of the feature cache

You can create a feature cache by clicking the Build Feature Cache button Build Feature Cache. You can also use the automatic cache (auto-cache) function to automatically update the feature cache whenever you move outside the currently cached extent.

The auto-cache can be useful if you are working in a series of different geographic areas and you don't want to rebuild the cache for each area. It is also convenient when you don't know the exact boundaries of the area you want to cache.

Since auto-caching may hinder performance, you should set an auto-cache minimum scale. A feature cache will be created automatically unless the map is zoomed out beyond the minimum scale. For example, suppose you set 1:50,000 as the minimum scale. When the map is zoomed in to 1:14,500, the feature cache will be created automatically, but when the map is zoomed out to 1:75,000, the feature cache will not be rebuilt.

For geodatabase data, the advantages of the feature cache are most pronounced when the data source is an ArcSDE geodatabase. In a multiuser environment, consistent use of the feature cache in ArcMap can significantly improve the overall performance of the system by reducing the number of queries to the geodatabase, the number of features retrieved from the geodatabase, and the overall network traffic. Care must be taken, though, when using feature caches to edit in multiuser, nonversioned edit sessions.

Learn more about the feature cache and nonversioned editing

In addition, there may be a minor performance gain with a feature cache for file or personal geodatabases, such as when editing features with large numbers of vertices or accessing the data over a network.

The feature cache is most useful when you are working within a specific map extent. Work that requires frequent panning and zooming across a large area will not usually benefit from a feature cache.

Creating a feature cache

  1. First, pan and zoom your map to the area where you will be working.
  2. On the main menu, click Customize > Toolbars > Feature Cache to add the Feature Cache toolbar.
  3. Click the Build Feature Cache button Build Feature Cache to create a feature cache for the current map extent.
TipTip:

  • Because the Feature Cache is stored in your computer's RAM, building a cache for a large area with many features may consume a large amount of memory and can take some time. You can cancel building the map cache by pressing the ESC key.
  • When working with a feature cache while editing, the rules for Stop Editing are that if edits are saved, the feature cache is maintained, and if edits are not saved, the feature cache is cleared. If the edit operation is aborted, whether it is on Stop Editing or within the current edit session, the feature cache is cleared.

Viewing the extent of the cached area

Click the Show Feature Cache button Show Feature Cache to view the extent of the current feature cache.

The currently cached area will flash on the map.

TipTip:

If any part of your current display extent is outside the cached area, you are no longer using the data cached on your computer. To use the feature cache again, you'll need to build a new cache, use auto-cache, or return to the cached extent.

Working with an auto-cache

Feature caches are used with very large feature classes containing hundreds of thousands of features. However, to maximize their effectiveness, it's important to set the cache areas for your map. If you have multiple work areas and are working with a large feature class, you can use an auto-cache to ensure efficient performance.

Turning on auto-cache enables you to work with a number of areas in your map and automatically cache the features in each of these working areas. A key step is to set a minimum map scale. Automatic feature caching will be turned off when you zoom out past this map scale. This allows you to navigate and move between various work areas on your map. When you zoom out beyond the minimum map scale, auto caching will be turned off. Feature caching will automatically be turned on again once you zoom in beyond the minimum map scale.

Steps

  1. On the Feature Cache toolbar, click the Toggles Auto-Cache button Toggles Auto-Cache to turn it on.
  2. Next, set the minimum auto-cache scale. This is the map scale where the auto-cache will automatically turn off if you zoom out beyond it. To do this, zoom your map to the desired auto-cache scale. In most cases, you can set the map extent for one of your typical working areas. Then, click the Set Auto-Cache Scale button Set Auto-Cache Scale.
TipTip:

You can also set auto-cache properties on the Data Frame Properties dialog box on the Feature Cache tab.

Using the Data Frame Properties dialog box to set the auto-cache

Related Topics


9/18/2012