Jaa


DataCacheLocalCacheInvalidationPolicy Enumeration

Specifies the way locally cached objects should be invalidated.

Namespace: Microsoft.ApplicationServer.Caching
Assembly: Microsoft.ApplicationServer.Caching.Core (in microsoft.applicationserver.caching.core.dll)

Usage

'Usage
Dim instance As DataCacheLocalCacheInvalidationPolicy

Syntax

'Declaration
Public Enumeration DataCacheLocalCacheInvalidationPolicy
public enum DataCacheLocalCacheInvalidationPolicy
public enum class DataCacheLocalCacheInvalidationPolicy
public enum DataCacheLocalCacheInvalidationPolicy
public enum DataCacheLocalCacheInvalidationPolicy

Members

Member name Description
NotificationBased Specifies that objects will stay in local cache until they are automatically invalidated by a cache notification. 
TimeoutBased Specifies that objects will stay in local cache until their lifetime reaches the localCacheTimeout duration specified in the DataCacheFactory constructor. 

Remarks

When using the TimeoutBased enumeration to specify local cache sync policy, once objects are downloaded to local cache, they will stay there until they reach the object timeout value specified in the DataCacheFactory constructor's localCacheTimeout parameter. When the objects reach the time-out value, they are invalidated so that each object can be refreshed from the cache cluster the next time that it is requested.

When using the NotificationBased enumeration, locally cached objects will be automatically invalidated by cache notifications. The object lifetime can only be as short as the notification polling interval specified by the DataCacheFactory constructor's pollInterval parameter.

For more information, see Expiration and Eviction (Velocity) and Cache Notifications (Velocity).

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).

Platforms

Development Platforms

Visual Studio 2010 and later, .NET Framework 4

Target Platforms

Windows 7; Windows Server 2008 R2; Windows Server 2008 Service Pack 2; Windows Vista Service Pack 2

Change History

See Also

Reference

Microsoft.ApplicationServer.Caching Namespace

  ff425062(v=azure.10).md 2011-08-26