Skip to main content

DataCacheRoot Class

The Root element that is used to connect Node elements to a cached data store.

Namespace: DevExpress.Xpo.DB

Assembly: DevExpress.Data.v24.2.dll

Declaration

public class DataCacheRoot :
    DataCacheBase

Remarks

The DataCacheRoot provides centralized access to a cached data store and promotes data cache updates across Node elements (DataCacheNode and DataCacheNodeLocal) connected to it. Only one Root element (DataCacheRoot or MSSql2005SqlDependencyCacheRoot) can be connected to a data store at one time. This ensures that any change being made to a data store within a cache structure is known to the Root element and as a result, to the entire cache structure as well.

A data store to be cached is passed as the DataCacheRoot constructor’s parameter. You can specify cache configuration settings and designate tables to be cached via the DataCacheRoot.Configure method.

Note

Direct SQL queries and stored procedure calls are not cached. To properly adjust the cache after the calls, use the following utility methods:

If you are using a MS SQL Server (version 2005 and later) database as a backend for a data store, you can enable the Root to be automatically notified about table updates. To accomplish this, use the MSSql2005SqlDependencyCacheRoot as the Root element in your cache hierarchy.

Inheritance

See Also