The property cache is a local cache used to store property data contained in the directory. This enables you to read properties or make changes to property data without making a direct connection to the server. Limiting server connections in this way increases network performance. Two methods used to exchange data between the server and the property cache include CommitChanges and RefreshCache. These methods are part of the DirectoryEntry class.
The CommitChanges method has the same features as SetInfo in ADSI. It saves data from the property cache to the directory. With this method, you can change numerous properties on an object before committing them to the directory. When you modify properties on multiple objects, commit property changes on one object before you change the properties of the next object.
The RefreshCache method has the same features as GetInfo in ADSI. It loads the values for all of the object properties from the underlying directory store into the local property cache.
Note If you modify properties, use the CommitChange method to store changes to the directory before you call RefreshCache, or the changes will be overwritten during the refresh.
When you modify properties, be aware that you understand the UsePropertyCache property on the DirectoryEntry class. When UsePropertyCache is set to its default value of True, CommitChanges must be called in order to commit changes to the directory. When set to False, changes are made to the directory automatically.