Skip to main content
All docs
V24.2

IDataSourceCacheKey.CustomData Property

A field with custom data.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v24.2.Core.dll

Declaration

[Browsable(false)]
Dictionary<string, string> CustomData { get; set; }

Property Value

Type Description
Dictionary<String, String>

A dictionary of <string, string> values. Stores the key’s custom data.

Remarks

Use the CustomData field to add custom information to the cache key. For example, you can add information about user groups to the cache key to use separate cached datasets for different users. Note that the information stored in the cache key can not be accessed from the client side.

The snippet below adds information about the current user to the cache key in the DataSourceCacheKeyCreated event handler:

configurator.DataSourceCacheKeyCreated += (sender, args) => {
    args.Key.CustomData.Add("currentUser", "Admin");
}

For more information on the caching mechanism in the Web Dashboard Control, refer to the following topic: Manage an In-Memory Data Cache.

See Also