ldap_memcache_flush()
Purpose
Remove entries from a search result cache
Format
#include <ldap.h>
void ldap_memcache_flush(
LDAPMemCache * cache,
const char * dn,
int scope)
Parameters
Input
- cache
- Specifies the search result cache handle.
- dn
- Specifies the base distinguished name as a null-terminated character
string in UTF-8 or the local EBCDIC code page, as determined by the
LDAP_LIBASCII
compiler variable. SpecifyNULL
for this parameter to flush all cache entries. - scope
- Specifies the name scope and must be one of the following:
LDAP_SCOPE_BASE
- Search just the entry specified by the base name.
LDAP_SCOPE_ONELEVEL
- Search the base entry and its immediate children.
LDAP_SCOPE_SUBTREE
- Search the base entry and all of its descendants.
Usage
The ldap_memcache_flush() routine removes entries from a search result cache. The dn parameter specifies the base distinguished name and the scope parameter specifies the name scope. All search requests whose base distinguished names fall within the range of the specified DN and scope are removed from the cache.
Examples: Assume
that the cache contains search requests for the following base distinguished
names:
o=Acme
ou=Manufacturing,o=Acme
ou=Research,o=Acme
cn=John Doe,ou=Manufacturing,o=Acme
cn=Jane Doe,ou=Research,o=Acme
- If ldap_memcache_flush() should be called
with
"o=Acme"
andscope=LDAP_SCOPE_BASE
, the"o=Acme"
cache entry is removed. - If ldap_memcache_flush() should be called
with
"o=Acme"
andscope=LDAP_SCOPE_ONELEVEL
, the"ou=Manufacturing,o=Acme"
and"ou=Research,o=Acme"
entries are removed. - If ldap_memcache_flush() should be called
with
"o=Acme"
andscope=LDAP_SCOPE_SUBTREE
, all entries are removed.
Function return value
There is no function return value.