Unregisters any event that may have been registered by the user against multiple cache keys

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

Syntax

C#
public virtual void UnRegisterCacheNotification(
	string[] key,
	CacheDataNotificationCallback callback,
	EventType eventType
)
Visual Basic
Public Overridable Sub UnRegisterCacheNotification ( 
	key As String(),
	callback As CacheDataNotificationCallback,
	eventType As EventType
)
Visual C++
public:
virtual void UnRegisterCacheNotification(
	array<String^>^ key, 
	CacheDataNotificationCallback^ callback, 
	EventType eventType
)

Parameters

key
Type: array<System..::..String>[]()[][]
An array of cache keys used to reference the cache itemst
callback
Type: Alachisoft.NCache.Web.Caching..::..CacheDataNotificationCallback
The CacheDataNotificationCallback that was specified while registering the event.
eventType
Type: Alachisoft.NCache.Runtime.Events..::..EventType
Type of event to unregister

Examples

Let us consider you registered an event against a bulk of keys
 Copy imageCopy
Cache cache = NCache.InitializeCache("myCache");
string[] keys=new string[size];
cache.RegisterCacheNotification(keys, new CacheDataNotificationCallback(ItemCallback), EventType.ItemAdded, EventDataFilter.None);
Now, Unregister this event by providing the key, callback and eventtype
 Copy imageCopy
cache.UnRegisterCacheNotification(keys, new CacheDataNotificationCallback(ItemCallback), EventType.ItemAdded);

See Also