Unregisters event that may have been registered against a specific key

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(
	String^ key, 
	CacheDataNotificationCallback^ callback, 
	EventType eventType
)

Parameters

key
Type: System..::..String
The cache key used to reference the cache item
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 the event to unregister

Examples

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

See Also