The Root element that is used to connect Node elements to a cached data store.
NuGet Package: DevExpress.Data
public class DataCacheRoot : DataCacheBase
Public Class DataCacheRoot Inherits DataCacheBase
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.
- The DataCacheBase.NotifyDirtyTables method of a Root or Node (for the MSSql2005SqlDependencyCacheRoot, use its MSSql2005SqlDependencyCacheRoot.NotifyDirtyTables) - To inform the cache about specific table changes.
- A Node’s DataCacheNode.CatchUp method - To synchronize the cache completely.
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.