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

Parameters

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