ArcGIS Blog

Mapping

ArcGIS Utility Network

Use feature cache capabilities of ArcGIS Pro

By Koya Brown

When working in ArcGIS Pro with feature services, creating a feature cache can help to speed up common tasks, in most cases. The feature cache allows you to temporarily store the features in the current map display locally. This benefits performance by improving the speed with which you can retrieve features from local storage, typically improving performance.

For example, I often work with complex or dense data such as Utility Network features, so I allow the data to draw, or load, completely to cache the features for potential performance gains as I move around the map. Essentially, I am relying on ArcGIS Pro to automatically cache, which happens because of default settings. However, there are instances when working with a team of editors that automatic caching is not optimal. There are also times when you should manually cache. If you’re working with subtype group layers, specific rules can improve feature cache behavior. So if you rely on ArcGIS Pro to automatically cache your features, you can access controls to better manage the feature cache. This blog article will cover how to use feature cache capabilities in ArcGIS Pro to your advantage because these settings can affect performance.

Caching

There are two types of caching: layer caching (feature layers) and feature caching (web feature layers or feature services). By default, all feature layers can be cached using caching options. Feature layer source data can be from a database, an enterprise geodatabase, or local layers. In this case, the cache is used to display extents you’ve previously visited.

Cache

Additionally, both layer and feature caching are used to reduce the number of queries sent to the data source, which is useful when trying to explore data in the map. In an enterprise environment, caching occurs by default, which reduces the number of data access requests. When multiple users edit data in the same area, they may require access to changes more frequently. In this case, if users need immediate access to updates, do not use caching. Also, when using any form of caching, data edits made by other people are not visible in your ArcGIS Pro session, so you must set caching options.

Feature caching is different than layer caching in that you’re using feature services in ArcGIS Pro, which is typically the case for Utility Network users. When working with feature services, using a local feature cache and layer caching can further reduce the data retrieval requests. Feature services automatically cache by default, which is designed to improve performance and scalability. With feature services, you can manage feature cache separately from layer caching, which will be discussed later. Generally, enabling the feature cache on your feature service reduces the number of requests made to the server, which results in better performance.

Feature cache

Feature cache behavior improves performance by storing features temporarily. This helps with common tasks such as exploring a map in ArcGIS Pro with high feature density. With feature caching, performance improvement occurs because as features are cached, the number of data access requests is reduced and query time for data is improved. This is especially helpful if there are a lot of users accessing the same service, which is common for utility organizations. Since the number of requests is lessened, this reduces the strain on the server.

One key behavior of feature caching is automatic fills, but there are times when automatically caching features will not work. For example, fill cache requests that take longer than 15 seconds for a given feature service layer will time out. This means each layer has 15 seconds to fill, which could be multiple queries taking 15 seconds, not just a single query. In this scenario, long running queries can overuse server resources, so when a layer’s cache takes longer than 15 seconds, the fill request is canceled for that layer. It will still attempt to cache at a larger scale.

Specific feature cache criteria must be met for automatic caching to work. You cannot rely on the map to finish drawing to feature cache because if the criteria is not met, the cache will not be filled. For example, one criterion is that when filters are present, the estimated number of features visible in the extent must be less than five times the row count threshold value. This rule is about filters, which include both definition queries and subtype group layers.

Subtype group layers and feature cache fill

Utility Network in ArcGIS Pro uses subtype group layers to draw layers, such as devices, more efficiently by making a single call to the source. This subtype group layer is a single (or composite) layer that has multiple sublayers. For feature caching, these layers may be treated as filters, which affects whether you will apply a definition query. For instance, when at least one subtype group layer is visible, it is treated as a filter.

There are two scenarios when a subtype group layer is not treated as a filter.

Scenario 1: If all subtype group layers are visible, they will not be treated as a filter. In this case, to determine whether a feature cache is filled, it will use the draw count from all visible subtype group layers.

This can be especially important for utility network users because most of the layers that are used to work with the data are subtype group layers, which means the feature cache fills may not work under certain conditions.

In the next scenario, nonvisible subtype group layers impact the feature cache.

Scenario 2: If none of the subtype group layers are visible, they are not treated as filters. Therefore, the nonvisible subtype group layers feature cache will not be filled.

Manage the feature cache

Feature cache controls are on the Map tab in the Feature Cache group. If you do not see the Feature Cache group on the ribbon, enable it in the project options under Map and Scene.

Add feature cache controls to ribbon

Once it is enabled, you can manage the access controls from the ribbon on the Map tab.

Feature cache controls

In the above image, the Feature Cache group is enabled. This means that new maps will automatically cache according to the feature cache criteria. In the Feature Cache group, there are four controls: Auto Cache (enabled when the group is added on the Map tab), Fill (fills the cache of the map extent for all visible layers), Empty (is always active and empties the feature cache for layers in the active map), and Cancel (cancels fill request in progress).

Manually manage cache

You can turn off automatic caching to manage the cache manually, for example, if you have multiple editors and need immediate access to changes. Keep in mind when you turn off automatic caching and turn off the Feature Cache group (which means the controls aren’t accessible on the Map tab), that map will no longer cache. However, new maps will have the automatic caching behavior so features will continue to cache. In short, automatic caching behavior is specific to the active map and turning it off disables it for one map, not across all maps.

Fill the feature cache manually

To use a feature cache, it must be filled. Auto Cache uses criteria to determine the layer caching, but you don’t have to rely only on automatic caching. It can be done manually too. When you manually fill the cache, using the Fill control, you can continue to work without impacting the fill process. Therefore, you can pan and zoom in your map or look at other maps. It is important to note that automatic caching is paused for the entire project when you use the Fill control. The layer must be visible. If your fill is taking too long because the area is too large, you can use the Cancel control to stop filling the cache.

You can now use feature cache capabilities in ArcGIS Pro to improve performance. You’ve learned the difference between layer caching and feature caching, how to improve the map and editing experience, and feature cache controls that can be used to manually manage and fill the feature cache. You also know how to use feature cache capabilities when working with feature services so you can reduce the strain on your ArcGIS Server site. This improves the overall system performance.

Share this article

Subscribe
Notify of
0 Comments
Oldest
Newest
Inline Feedbacks
View all comments