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.1.0.0 (4.1.0.0)

Syntax

C#
public virtual void RegisterKeyNotificationCallback(
	string key,
	CacheItemUpdatedCallback updateCallback,
	CacheItemRemovedCallback removeCallback
)
Visual Basic
Public Overridable Sub RegisterKeyNotificationCallback ( _
	key As String, _
	updateCallback As CacheItemUpdatedCallback, _
	removeCallback As CacheItemRemovedCallback _
)
Visual C++
public:
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