How to: Remove a Cache Notification Callback (Velocity)

05/24/2009

Use the RemoveCallback method to remove a cache notification callback. To identify the notification, this method requires the 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 and that adds the callback and the code in the application that removes the callback. The DataCacheNotificationDescriptor object returned to the method invoked by the cache notification can also be used to remove a callback.

Note 
In order for your application to use notifications, you need to enable them on a named cache. Use the notificationsEnabled parameter with the New-Cache or Set-CacheConfig commands. For more information, see Cache Administration with PowerShell (Velocity).

How to remove a callback cache notification
Declare the DataCacheNotificationDescriptor object you use to add a callback at a scope that is accessible to the code that will remove the callback.

Use the RemoveCallback method to remove the cache notification callback. Use the appropriate DataCacheNotificationDescriptor object for the nd parameter.

Posted in: .Net Programming| Tags: .net 4.0 Application CTP CTP 3 Microsoft Velocity cache code use notification method callback remove datacachenotificationdescriptor

Hot Posts

Latest posts

Tags

Others

Sponsors