Поділитися через


Cache Notifications Methods (Windows Server AppFabric Caching)

Windows Server AppFabric allows your cache-enabled application to receive cache notifications. Use methods listed in the table when working with cache notifications. For more information, see Cache Notifications (Windows Server AppFabric Caching).

Note

You must enable cache notifications with the Windows PowerShell-based cache administration tool by using the notificationsEnabled parameter of the New-Cache or Set-CacheConfig commands before it is available to use. For more information, see Using Windows PowerShell to Manage Windows Server AppFabric Caching Features

Method Description

DataCacheFactory

The parameterized DataCacheFactory constructor allows you to programmatically configure your cache client. By using this constructor, you can specify a cache notification poll interval value different than the default 300 seconds.

Your cache-enabled application should minimize the number of DataCacheFactory objects it instantiates. Store the DataCacheFactory object in a variable that is available to all parts of the application that use the cache client.

AddCacheLevelBulkCallback

This method adds a cache notification callback for cache operations with a cache-level notification scope. Use this method when you want to be notified of region- and item-based cache operations occurring on all regions and items.

AddRegionLevelCallback

This method adds a cache notification callback for cache operations with a region-level notification scope. Use this method when you want to be notified of region- and item-based cache operations occurring on one specific region.

AddItemLevelCallback

This method adds a cache notification callback for cache operations with an item-level notification scope. Use this method when you want to be notified of item-based cache operations occurring on one specific item.

AddFailureNotificationCallback

This method allows your application to be notified when it has missed some notifications.

RemoveCallback

This method allows your application to remove a cache notification callback.

See Also

Concepts

Class Overview (Windows Server AppFabric Caching)
Tag-Based Methods (Windows Server AppFabric Caching)
Concurrency Methods (Windows Server AppFabric Caching)
Configuration Methods (Windows Server AppFabric Caching)
Using Basic Cache Methods (Windows Server AppFabric Caching)
Windows Server AppFabric Caching Concepts