Skip to main content
All docs
V24.1

DataSourceCacheKeyCreatedEventArgs.InvalidateCacheRecord() Method

Invalidates the associated cache record.

Namespace: DevExpress.DashboardWeb

Assembly: DevExpress.Dashboard.v24.1.Web.dll

NuGet Package: DevExpress.Web.Dashboard.Common

Declaration

public void InvalidateCacheRecord()

Remarks

Use the InvalidateCacheRecord method to reset the cache record referenced by the current cache key. This way you can ensure that data is always requested from the server and users have access to the latest changes.

The following code snippet invalidates the cache record for the sqlDataSource1 data source in the ASP.NET Core Dashboard Control:

configurator.DataSourceCacheKeyCreated += (sender, args) => {
    if(args.Key.DataSourceId == "sqlDataSource1")
        args.InvalidateCacheRecord();
};
See Also