Delegate CacheStoppedCallback
Defines a callback method for notifying applications when the Alachisoft.NCache.Client.Cache is stopped.
Namespace:
Assembly: Alachisoft.NCache.Client.dll
Syntax
public delegate void CacheStoppedCallback(string cacheId);
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheId | 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 Alachisoft.NCache.Client.Cache is stopped.
Examples
The following example demonstrates how to use the CacheStoppedCallback class to notify an application when a cache is stopped.
public void OnCacheStopped(string cacheId)
{
// ...
}
protected void Application_Start(object sender, EventArgs e)
{
try
{
ICache cache = CacheManager.GetCache("demoClusteredCache");
cache.NotificationService.CacheStopped += new CacheStoppedCallback(this.OnCacheStopped);
}
catch(Exception ex)
{
}
}