This documentation is archived and is not being maintained.

DirectoryEntry.UsePropertyCache Property

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

[Visual Basic]
Public Property UsePropertyCache As Boolean
public bool UsePropertyCache {get; set;}
public: __property bool get_UsePropertyCache();
public: __property void set_UsePropertyCache(bool);
public function get UsePropertyCache() : Boolean;
public function set UsePropertyCache(Boolean);

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 done 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.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

DirectoryEntry Class | DirectoryEntry Members | System.DirectoryServices Namespace | CommitChanges