DirectoryEntry.UsePropertyCache 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值指示在每次运算之后是否应提交缓存。
public:
property bool UsePropertyCache { bool get(); void set(bool value); };
public bool UsePropertyCache { get; set; }
[System.DirectoryServices.DSDescription("DSUsePropertyCache")]
public bool UsePropertyCache { get; set; }
member this.UsePropertyCache : bool with get, set
[<System.DirectoryServices.DSDescription("DSUsePropertyCache")>]
member this.UsePropertyCache : bool with get, set
Public Property UsePropertyCache As Boolean
属性值
如果在每次运算之后不应提交缓存,则为 true
;否则为 false
。 默认值为 true
。
- 属性
注解
默认情况下,对属性所做的更改在本地对缓存进行更改,并在第一次读取后缓存要读取的属性值。 UsePropertyCache当属性为true
时,对DirectoryEntry对象的属性的访问速度更快。 将此设置设置为 false
在每次操作后提交缓存。
UsePropertyCache如果属性是true
并且要提交缓存的更改,请调用CommitChanges该方法。 若要在对目录进行更改后更新缓存中的值,请调用该方法 RefreshCache 。
注意
如果在调用之前调用RefreshCacheCommitChanges,则对属性缓存所做的任何未提交的更改都将丢失。
备注
Internet Information Services (IIS) 提供程序不支持在每次操作后提交缓存。