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 方法。
注意
如果在调用 CommitChanges之前调用 RefreshCache ,则对属性缓存的任何未提交更改都将丢失。
注意
Internet Information Services (IIS) 提供程序不支持在每次操作后提交缓存。
适用于
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈