Cache Notifications (Velocity)

05/21/2009

To receive asynchronous cache notifications, add a cache notification callback to your application. When you add the callback, you define the types of cache operations that trigger a cache notification and which method in your application should be called when the specified operations occur. This topic describes the process in detail.

Note 
In order to use cache notifications, you will have to enable cache notifications on a named cache with the New-Cache or Set-CacheConfig PowerShell cmdlets from the PowerShell-based cache administration tool. You also need to configure your application to use a routing client.

Triggering Cache Notifications
As shown in the following figure, changes to both regions and cached objects (referred to as items within the cache) can trigger cache notifications.

These cache operations are defined by members of the DataCacheOperation class.

Region Operations
Your application can receive cache notifications when the following cache operations occur on a region.

CreateRegion: When a region is created in the cache.

ClearRegion: When a region is cleared in the cache.

RemoveRegion: When a region is removed from the cache.

Item Operations
Your application may receive cache notifications when the following cache operations occur on a cached object (referred to as an item within the cache).

AddItem: When an item is added to the cache.

ReplaceItem: When an item is replaced in the cache.

RemoveItem: When an item is removed from the cache.

Posted in: C# and .NET| Tags: Velocity CTP CTP 3 Distribute Cache Cache Notification

Hot Posts

Latest posts

Tags

Others

Sponsors

asp.net interview questions