Decerements the reference count of the cache and performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Namespace: Alachisoft.NCache.Web.Caching
Assembly: Alachisoft.NCache.Web (in Alachisoft.NCache.Web.dll) Version: (


public virtual void Dispose()
Visual Basic
Public Overridable Sub Dispose
Visual C++
virtual void Dispose()




The behavior of this method depends upon the cache's sharing mode (inproc/outproc) specified in the configuration.

If the application uses the cache in inproc mode, calling Dispose closes the cache and releases the resources used by it. If in a cluster the calling node leaves the cluster as well.

If the application uses the cache in outproc mode, calling Dispose releases the reference to the cache object. The cache itself remains operational and cluster remains intact.

See Also