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

屬性值

如果在每一項作業之後不應該認可快取,則為 true否則為 false。 預設為 true

屬性

備註

根據預設,屬性的變更會在本機對快取進行,而要讀取的屬性值會在第一次讀取之後快取。 UsePropertyCache當 屬性為 true時,對DirectoryEntry對象的屬性的存取速度會更快。 將此設定為 false 會導致每個作業之後認可快取。

UsePropertyCache如果 屬性是 true 且您想要認可快取的變更,請呼叫 CommitChanges 方法。 若要在變更目錄之後更新快取中的值,請呼叫 RefreshCache 方法。

警告

如果您在呼叫 之前呼叫 RefreshCacheCommitChanges,則屬性快取的任何未認可的變更都會遺失。

注意

Internet Information Services (IIS) 提供者不支援在每個作業之後認可快取。

適用於

另請參閱