NCache 4.6 - Online Documentation

ExtensibleDependency Class

In custom dependency, the user can have his own dependencies scenarios. In this way, items can be be expired from cache in a number of flexible ways where expiration logic meets the user’s business requirements. NCache provides an abstract class ExtensibleDependency that is base for all dependencies.
For overriding ExtensibleDependency class, user’s program needs a reference to the assembly Alachisoft.NCache.Runtime.dll that contain abstract class ExtensibleDependency. ExtensibleDependency class contains following abstract methods and property.
ExtensibleDependency Class
        public abstract bool HasChanged { get; }
        public abstract bool Initialize();
This method can be used to perform tasks like allocating resources, acquiring connections etc. If resources has been successfully acquired, return true else false. If Initialize return false NCache removes item with custom dependency from the cache.
NCache calls HasChanged (property) after every clean interval. If HasChanged returns true all custom dependent items will be removed from cache.  
See Also