DirectoryEntry.UsePropertyCache DirectoryEntry.UsePropertyCache DirectoryEntry.UsePropertyCache DirectoryEntry.UsePropertyCache Property

定義

取得或設定值,指出在每一個作業之後是否應該認可快取。Gets or sets a value indicating whether the cache should be committed after each operation.

public:
 property bool UsePropertyCache { bool get(); void set(bool value); };
[System.DirectoryServices.DSDescription("DSUsePropertyCache")]
public bool UsePropertyCache { get; set; }
member this.UsePropertyCache : bool with get, set
Public Property UsePropertyCache As Boolean

屬性值

如果在每一項作業之後不應該認可快取,為 true,否則,為 falsetrue if the cache should not be committed after each operation; otherwise, false. 預設為 trueThe default is true.

備註

根據預設,屬性的變更是在本機對快取進行,而要讀取的屬性值會在第一次讀取之後快取。By default, changes to properties are made locally to a cache, and property values to be read are cached after the first read. 當屬性為true時,對DirectoryEntry物件屬性的存取速度會更快。 UsePropertyCacheWhen the UsePropertyCache property is true, access to the DirectoryEntry object's properties is faster. 將此設定false為,會在每次作業之後認可快取。Setting this to false will cause the cache to be committed after each operation.

如果屬性為true ,而您想要認可快取的CommitChanges變更,請呼叫方法。 UsePropertyCacheIf the UsePropertyCache property is true and you want to commit cached changes, call the CommitChanges method. 若要在對目錄進行變更之後更新快取中的值,請RefreshCache呼叫方法。To update values in the cache after changes to the directory are made, call the RefreshCache method.

警告

如果您在RefreshCache呼叫CommitChanges之前呼叫,將會遺失對屬性快取的任何未認可變更。If you call RefreshCache before calling CommitChanges, any uncommitted changes to the property cache will be lost.

注意

Internet Information Services (IIS)提供者不支援在每個作業之後認可快取。The Internet Information Services (IIS) provider does not support committing the cache after each operation.

適用於

另請參閱