DataCache.RemoveCallback Method (DataCacheNotificationDescriptor)


Removes a cache notification callback. Not supported in Windows Azure Shared Caching.

Namespace:   Microsoft.ApplicationServer.Caching
Assembly:  Microsoft.ApplicationServer.Caching.Client (in Microsoft.ApplicationServer.Caching.Client.dll)

public void RemoveCallback(
	DataCacheNotificationDescriptor notificationDescriptor



The DataCacheNotificationDescriptor object that identifies the callback that should be removed.

Once added, your application will continue to receive cache notifications until it removes the callback. To identify a notification, this method requires the corresponding DataCacheNotificationDescriptor object that was returned when you added the callback. To facilitate this requirement, declare your DataCacheNotificationDescriptor object at a scope that is accessible to the code in your application that adds the callback and the code in your application that removes the callback.


In order for your application to use notifications, you need to enable them on a named cache. For Windows Server AppFabric Caching, use the NotificationsEnabled parameter with the New-Cache or Set-CacheConfig Windows PowerShell commands. For Windows Azure Caching on roles, enable notifications in the cache settings.

Return to top