Tracks cache dependencies, which can be files, directories, or keys to other objects in application's Cache. This class cannot be inherited.

Namespace: Alachisoft.NCache.Runtime.Dependencies
Assembly: Alachisoft.NCache.Runtime (in Alachisoft.NCache.Runtime.dll) Version: 4.3.0.0 (4.3.0.0)

Syntax

C#
[SerializableAttribute]
public class CacheDependency : IDisposable
Visual Basic
<SerializableAttribute>
Public Class CacheDependency
	Implements IDisposable
Visual C++
[SerializableAttribute]
public ref class CacheDependency : IDisposable

Remarks

This Feature is Not Available in Express You can add items with dependencies to your application's cache with the [!:Cache.Add] and Insert methods.

When you add an item to an application's [!:Cache] object and in doing so define a cache dependency for that item, an instance of the CacheDependency class is created automatically to track changes to the files, keys, or directories you have specified. This helps you avoid losing changes made to the object between the time it is created and the time it is inserted into the [!:Cache]. The CacheDependency instance can represent a single file or directory, an array of files or directories, or an array of files or directories along with an array of cache keys (these represent other items stored in the [!:Cache] object).

Inheritance Hierarchy

See Also