TreeListSettings.DataCacheMode Property

Gets or sets whether data caching is enabled.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v21.1.dll

Declaration

public TreeListDataCacheMode DataCacheMode { get; set; }

Property Value

Type Description
TreeListDataCacheMode

One of the TreeListDataCacheMode enumeration values.

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 TreeList 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 TreeList 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 Web application scalability.

To disable data caching, set the DataCacheMode property to Disabled. This can be useful when the TreeList 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