Export (0) Print
Expand All

DirectoryEntry.UsePropertyCache Property

Gets or sets a value indicating whether the cache should be committed after each operation.

Namespace: System.DirectoryServices
Assembly: System.DirectoryServices (in system.directoryservices.dll)

public bool UsePropertyCache { get; set; }
/** @property */
public boolean get_UsePropertyCache ()

/** @property */
public void set_UsePropertyCache (boolean value)

public function get UsePropertyCache () : boolean

public function set UsePropertyCache (value : boolean)

Not applicable.

Property Value

true if the cache should not be committed after each operation; otherwise, false. The 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. 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 noteCaution:

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

NoteNote:

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

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft