大网数据广告活动
域与目录服务

The ADSI Attribute Cache

· 52CE 我爱测

The ADSI object model provides a client-side attribute cache for each ADSI object.

The ADSI object model provides a client-side attribute cache for each ADSI object. The attribute cache is comparable to a table in memory that contains the names and values of most object attributes that have been downloaded. Some attributes, such as operational attributes, are not cached. ADSI uses property caching to enhance the performance of attribute manipulation and add transactioning capability for attribute read and write operations. This capability is critical for clients written in languages that have no native batching mechanism for setting attributes, such as Microsoft Visual Basic development system. Without the ADSI property cache, such clients would have to access the server every time an attribute is read or written.

When an object is created or first bound to, the property cache for the object is empty. When the IADs::GetInfo method is called, ADSI loads the requested attributes for the object from the underlying directory service into the local cache. When a specific attribute value is read and the cache is empty, ADSI makes an implicit call to the IADs::GetInfo method. When the cache is filled, all attribute read operations work on the contents of the cache only.

When an attribute value is written, the new value is stored in the local cache until the IADs::SetInfo method is called. When the IADs::SetInfo method is called, the attributes in the cache are committed to the underlying directory service. After the IADs::SetInfo method is called, the values remain in the cache until explicitly refreshed with another call to the IADs::GetInfo method.

Important: The IADs::GetInfo method must be used carefully because this method will always overwrite the attribute values in the cache from the underlying directory service, even if the cached value has been changed. That is, it will overwrite attribute values that have been changed in the cache, but not committed to the underlying directory service with a call to the IADs::SetInfo method.

The following figure shows the different methods used to operate on the cache.

adsi attribute cache

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。