DirectoryEntry.UsePropertyCache 属性

定义

获取或设置一个值,该值指示在每次运算之后是否应提交缓存。

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

属性值

Boolean

如果在每次运算之后不应提交缓存,则为 true;否则为 false。 默认值为 true

属性

注解

默认情况下,对属性所做的更改在本地对缓存进行更改,并在第一次读取后缓存要读取的属性值。 UsePropertyCache当属性为true时,对DirectoryEntry对象的属性的访问速度更快。 将此设置设置为 false 在每次操作后提交缓存。

UsePropertyCache如果属性是true并且要提交缓存的更改,请调用CommitChanges该方法。 若要在对目录进行更改后更新缓存中的值,请调用该方法 RefreshCache

注意

如果在调用之前调用RefreshCacheCommitChanges,则对属性缓存所做的任何未提交的更改都将丢失。

备注

Internet Information Services (IIS) 提供程序不支持在每次操作后提交缓存。

适用于

另请参阅