For web feature layers, a feature cache is used to improve performance and common tasks by storing features in a temporary folder. The cache is automatically managed and as features are cached, the number of queries needed to retrieve data is reduced and drawing time is improved. This can be useful when working with large or complex datasets, in a specific map extent, or when numerous users are using the same service. This also reduces strain on the server as it reduces the number of service requests.
By default, the feature cache is filled automatically by the application; this is the recommended setting. The cache is filled each time the map has finished drawing and the following five criteria are met:
- The layer is visible in the Contents pane.
- The layer is displaying based on the visible scale range.
- The total number of features drawn is less than five times the row count threshold value on the service layer.
- The caching option on the layer properties dialog box is set to Clear cache when the session ends.
- The estimated number of features in the visible extent is less than five times the row count threshold value when filters are present.
Note:
Filters include display filters, definition queries, subtype group layers, and symbol classes.
Caution:
It is not recommended to cache layers that are published with definition queries if you intend on editing them. This is because service-based definition queries are not available to ArcGIS Pro. When using these layers, features that do not meet the definition query may still display in ArcGIS Pro even though they will not be visible in other applications. These features may disappear during the session and will disappear the next time ArcGIS Pro is opened.
Additional details for the row count threshold, estimated row counts, and subtype group layers will also be used to determine whether the cache will fill automatically.
Row count threshold
The row count threshold is used to determine when the feature cache will fill. Row count threshold is set to 2,000 or the feature service layer maxRecordCount, whichever is lower.
Estimated row counts
When estimated row counts is supported and a layer has filters, ArcGIS Pro will use estimated row counts and the five criteria described above to determine whether the feature cache will fill. If a layer does not have filters, estimated row counts will not be used and ArcGIS Pro will use the five criteria described above to determine whether the feature cache will fill.
If the estimated row counts of the entire feature service layer are less than five times the row count threshold, the feature cache will be filled for the full extent of the feature service layer.
For feature service layers that do not support the estimated row counts, the feature cache will not be filled if there are filters on the layers.
Note:
To determine whether the feature service supports estimated row counts, go to the layer's JSON resource and look for the infoInEstimates parameter. If count is seen within this array, ArcGIS Pro will obtain estimated row counts.
Subtype group layers
There are times in which subtype group layers may or may not be considered filters.
Subtype group layers are considered filters when at least one sublayer within is visible. For this scenario, estimated row counts will be used to fill the feature cache if supported.
Subtype group layers are not considered filters when all the subtype group layers are visible. For this scenario, the sum of the draw count from all visible subtype group layers will be used to determine whether the feature cache fills.
Subtype group layers are not considered filters when no subtype group layers are visible. For this scenario, the subtype group layers will be considered nonvisible and the feature cache will not be filled for these layers.
In scenarios in which the application determines not to fill the feature cache for a layer (in other words, the five criteria listed above are not satisfied), you can manage the cache manually to take advantage of the performance benefits provided by the cache.