Registers the CacheItemUpdatedCallback and/or CacheItemRemovedCallback for the list of specified 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#
[ObsoleteAttribute("This method is deprecated. 'Please use RegisterCacheNotification(string[] keys, CacheDataNotificationCallback selectiveCacheDataNotificationCallback, EventType eventType, EventDataFilter datafilter)'", 
	false)]
public virtual void RegisterKeyNotificationCallback(
	string[] keys,
	CacheItemUpdatedCallback updateCallback,
	CacheItemRemovedCallback removeCallback
)
Visual Basic
<ObsoleteAttribute("This method is deprecated. 'Please use RegisterCacheNotification(string[] keys, CacheDataNotificationCallback selectiveCacheDataNotificationCallback, EventType eventType, EventDataFilter datafilter)'", 
	false)> 
Public Overridable Sub RegisterKeyNotificationCallback ( 
	keys As String(),
	updateCallback As CacheItemUpdatedCallback,
	removeCallback As CacheItemRemovedCallback
)
Visual C++
public:
[ObsoleteAttribute(L"This method is deprecated. 'Please use RegisterCacheNotification(string[] keys, CacheDataNotificationCallback selectiveCacheDataNotificationCallback, EventType eventType, EventDataFilter datafilter)'", 
	false)]
virtual void RegisterKeyNotificationCallback(
	array<String^>^ keys, 
	CacheItemUpdatedCallback^ updateCallback, 
	CacheItemRemovedCallback^ removeCallback
)

Parameters

keys
Type: array<System..::..String>[]()[][]
The list of the cache keys used to reference the cache items.
updateCallback
Type: Alachisoft.NCache.Web.Caching..::..CacheItemUpdatedCallback
The CacheItemUpdatedCallback that is invoked if the item with the specified key is updated in the cache.
removeCallback
Type: Alachisoft.NCache.Web.Caching..::..CacheItemRemovedCallback
The CacheItemRemovedCallback is invoked when the item with the specified key is removed from the cache.

Remarks

CacheItemUpdatedCallback and/or CacheItemRemovedCallback provided this way are very useful because a client application can show interest in any item already present in the cache. As soon as the item is updated or removed from the cache, the client application is notified and actions can be taken accordingly.

See Also