Defines a callback method for notifying applications when the Cache is stopped.

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

Syntax

C#
public delegate void CacheStoppedCallback(
	string cacheId
)
Visual Basic
Public Delegate Sub CacheStoppedCallback ( _
	cacheId As String _
)
Visual C++
public delegate void CacheStoppedCallback(
	String^ cacheId
)

Parameters

cacheId
Type: System..::..String
The Identification of the cache being stopped. It is helpful as multiple cache instances can exists with in the same application.

Remarks

This handler is invoked when a Cache is stopped.

Examples

The following example demonstrates how to use the CacheStoppedCallback class to notifiy an application when a cache is stopped. You could include this code in a code declaration block in the Web Forms page, or in a page code-behind file.
CopyC#
public void OnCacheStopped(string cacheId)
{
    // ...
}

protected void Application_Start(object sender, EventArgs e)
{
    try
    {
        NCache.InitializeCache("myCache");
        NCache.Cache.CacheStopped += new CacheStoppedCallback(this.OnCacheStopped);
    }
    catch(Exception e)
    {
    }
}

See Also