Skip to main content

ASPxTreeList.DataCacheMode Property

Gets or sets whether data caching is enabled.

Namespace: DevExpress.Web.ASPxTreeList

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

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(TreeListDataCacheMode.Auto)]
public TreeListDataCacheMode DataCacheMode { get; set; }

Property Value

Type Default Description
TreeListDataCacheMode Auto

A TreeListDataCacheMode enumeration value that specifies whether data caching is enabled.

Available values:

Name Description
Enabled

Enables data caching.

Disabled

Disables data caching.

Auto

The ASPxTreeList enables or disables data caching on demand. Data cashing is enabled if at least one of the following conditions are met:

  • data paging is enabled;
  • the number of visible nodes divided by the number of visible columns is less than 1,000 (avoids a heavy callback state).

Remarks

By default, the ASPxTreeList enables or disables data caching on demand. Data caching is enabled if at least one of the following conditions are met:

  • data paging is enabled;
  • the number of visible nodes divided by the number of visible columns is less than 1,000 (avoids a heavy callback state).

If the DataCacheMode property is set to Enabled, the ASPxTreeList stores data in memory for quick access. This avoids repeated database calls when performing various operations that don’t require reloading data (e.g. rearranging or hiding columns). As a result, this increases the Web application scalability.

To disable data caching, set the DataCacheMode property to Disabled. This can be useful when the ASPxTreeList displays real-time data. It’s also recommended that you disable this option when binding to data created at runtime, because calling the DataBind() method always reloads data from the server.

See Also