此页面有用吗?
您对此内容的反馈非常重要。 请告诉我们您的想法。
更多反馈?
1500 个剩余字符
导出 (0) 打印
全部展开
展开 最小化

DataCacheLocalCacheInvalidationPolicy 枚举

注:本页面内容可能不完全适用中国大陆地区运营的 Windows Azure服务。如要了解不同地区 Windows Azure 服务的差异, 请参考本网站.

指定使本地缓存的对象失效的方法。

命名空间:  Microsoft.ApplicationServer.Caching
程序集:  Microsoft.ApplicationServer.Caching.Core(在 Microsoft.ApplicationServer.Caching.Core.dll 中)

public enum DataCacheLocalCacheInvalidationPolicy

成员名称说明
NotificationBased指定在缓存通知自动使对象失效之前对象将一直驻留在本地缓存中。在 Windows Azure Shared Caching 中不受支持。
TimeoutBased指定在对象的生存期达到 DataCacheFactory 构造函数中指定的 localCacheTimeout 时间之前对象将一直驻留在本地缓存中。

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.

注意注意

Notifications are not supported in Windows Azure Shared Caching. Windows Azure Shared Caching must use TimeoutBased invalidation.

In order for your application to use notifications, you need to enable them on a named cache. In Microsoft AppFabric 1.1 for Windows Server Caching, use the notificationsEnabled parameter with the New-Cache or Set-CacheConfig Windows PowerShell commands. In Windows Azure Caching, enable notifications in the Caching configuration of the role that hosts the cache.

社区附加资源

添加
Microsoft 正在进行一项网上调查,以了解您对 MSDN 网站的意见。 如果您选择参加,我们将会在您离开 MSDN 网站时向您显示该网上调查。

是否要参加?
显示:
© 2015 Microsoft