dashboard-devexpress-dot-dashboardweb-dot-dashboardconfigurator-7fd9f1c5.md
Specifies whether the Web Dashboard Control caches its data sources.
Namespace : DevExpress.DashboardWeb
Assembly : DevExpress.Dashboard.v25.2.Web.dll
NuGet Package : DevExpress.Web.Dashboard.Common
public bool DataSourceCacheEnabled { get; set; }
Public Property DataSourceCacheEnabled As Boolean
| Type | Description |
|---|---|
| Boolean |
true to enable data source caching; otherwise, false.
|
The Web Dashboard Control uses the caching mechanism to improve performance when working with data sources. For more information on the caching mechanism, refer to the following topic: Manage an In-Memory Data Cache.
Set the DataSourceCacheEnabled property to false to disable data source caching. When the caching is disabled, data is queried from the database each time a dashboard item requests data. ConfigureDataConnection and DataLoading events are fired every time data is requested.
The following code snippets disable cache in the ASP.NET Core Dashboard Control and ASP.NET MVC Dashboard Extension:
DashboardConfigurator configurator = new DashboardConfigurator();
configurator.DataSourceCacheEnabled = false;
DashboardConfigurator.Default.DataSourceCacheEnabled = false;
See Also
Manage an In-Memory Data Source Cache in ASP.NET MVC and ASP.NET Core