Читати англійською Редагувати

Поділитися через


DirectoryEntry.UsePropertyCache Property

Definition

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

C#
public bool UsePropertyCache { get; set; }
C#
[System.DirectoryServices.DSDescription("DSUsePropertyCache")]
public bool UsePropertyCache { get; set; }

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.

Застереження

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

Примітка

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

Applies to

Продукт Версії
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also