ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Map Class / ClearFeatureCacheAsync Method / ClearFeatureCacheAsync(IEnumerable<Layer>,Boolean) Method
The set of layers
Show a toast notification when the cache operation is complete.

In This Topic
    ClearFeatureCacheAsync(IEnumerable<Layer>,Boolean) Method
    In This Topic
    Empties the feature cache for the specified web feature layers (feature services) that are part of this map. Layers that are not part of this map or do not support feature caching are ignored.
    Syntax
    public Task ClearFeatureCacheAsync( 
       IEnumerable<Layer> layers,
       bool showNotification
    )
    Public Overloads Function ClearFeatureCacheAsync( _
       ByVal layers As IEnumerable(Of Layer), _
       ByVal showNotification As Boolean _
    ) As Task

    Parameters

    layers
    The set of layers
    showNotification
    Show a toast notification when the cache operation is complete.
    Exceptions
    ExceptionDescription
    Emptying the feature cache is only allowed on the active map.
    Emptying the feature cache is not allowed during an edit session.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also