แก้ไข

แชร์ผ่าน


DirectoryEntry.UsePropertyCache Property

Definition

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); };
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

Property Value

true if the cache should not be committed after each operation; otherwise, false. The default is true.

Attributes

Remarks

By default, changes to properties are made locally to a cache, and property values to be read are cached after the first read. When the UsePropertyCache property is true, access to the DirectoryEntry object's properties is faster. Setting this to false will cause the cache to be committed after each operation.

If the UsePropertyCache property is true and you want to commit cached changes, call the CommitChanges method. To update values in the cache after changes to the directory are made, call the RefreshCache method.

Caution

If you call RefreshCache before calling CommitChanges, any uncommitted changes to the property cache will be lost.

Note

The Internet Information Services (IIS) provider does not support committing the cache after each operation.

Applies to

See also