Attribute cache
The attribute cache has the advantage of being able to resolve filters in memory rather than in the database. It also has the advantage of being updated each time an LDAP add, delete, modify, or modrdn operation is performed.
In deciding which attributes you want to store in memory, consider:
- The amount of memory available to the server
- The size of the directory
- The types of search filters the application typically uses
The attribute cache manager can resolve the following types of simple filters: exact match filters and presence filters. It can resolve complex filters that are conjunctive or disjunctive, and the subfilters must be exact match, presence, conjunctive, or disjunctive.
Not all attributes can be added to the attribute cache. To determine whether or not an attribute can be added to the cache, use the ldapexop command:
- For attributes that can be added: ldapexop -op getattributes -attrType attribute_cache -matches true
- For attributes that cannot be added: ldapexop -op getattributes -attrType attribute_cache -matches false
Attribute caching can be configured two ways: manually or automatically. To manually configure attribute caching, the administrator should perform cn=monitor searches to understand how to make attribute caching most effective. These searches return current information listing which attributes are cached, the amount of memory used by each attribute cache, the total amount of memory used by attribute caching, the amount of memory configured for attribute caching, and a list of the attributes most often used in search filters. Using this information, an administrator can change the amount of memory that is allowed to be used for attribute caching, as well as which attributes to cache whenever necessary based on new cn=monitor searches.
Alternatively, an administrator can configure automatic attribute caching. When automatic attribute caching is enabled, the Directory Server tracks the combination of attributes that would be most useful to cache within the memory limits defined by the administrator. It then updates the attribute caching at a time and time interval configured by the administrator.
Parent topic:
Server caches