Back to Devexpress

DashboardConfigurator.DataSourceCacheEnabled Property

dashboard-devexpress-dot-dashboardweb-dot-dashboardconfigurator-7fd9f1c5.md

latest2.5 KB
Original Source

DashboardConfigurator.DataSourceCacheEnabled Property

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

Declaration

csharp
public bool DataSourceCacheEnabled { get; set; }
vb
Public Property DataSourceCacheEnabled As Boolean

Property Value

TypeDescription
Boolean

true to enable data source caching; otherwise, false.

|

Remarks

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:

cs
DashboardConfigurator configurator = new DashboardConfigurator();
configurator.DataSourceCacheEnabled = false;
cs
DashboardConfigurator.Default.DataSourceCacheEnabled = false;

See Also

Manage an In-Memory Data Source Cache in ASP.NET MVC and ASP.NET Core

DashboardConfigurator Class

DashboardConfigurator Members

DevExpress.DashboardWeb Namespace