1 .TH LDAP_CACHE 3 "22 September 1998" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 ldap_enable_cache, ldap_disable_cache, ldap_destroy_cache, ldap_flush_cache, ldap_uncache_entry, ldap_uncache_request, ldap_set_cache_options \- LDAP client caching routines
14 ldap_enable_cache( ld, timeout, maxmem )
21 void ldap_disable_cache( ld )
26 void ldap_destroy_cache( ld )
31 void ldap_flush_cache( ld )
36 void ldap_uncache_entry( ld, dn )
42 void ldap_uncache_request( ld, msgid )
48 void ldap_set_cache_options( ld, opts )
55 These routines are used to control the behavior of client caching of
60 default, the cache is disabled and no caching is done. Enabling the
61 cache can greatly improve performance and reduce network bandwidth when
62 a client DUA makes repeated requests.
64 .B ldap_enable_cache()
65 should be called to turn on local caching or to
66 change cache parameters (lifetime of cached requests and memory used).
67 The \fIld\fP parameter should be the result of a successful call to
69 The \fItimeout\fP is specified in seconds, and is used to
70 decide how long to keep cached requests. The \fImaxmem\fP value is in
71 bytes, and is used to set an upper bound on how memory the cache will
72 use. You can specify 0 for \fImaxmem\fP to restrict the cache size by
73 the \fItimeout\fP only. The first call to ldap_enable_cache creates
74 the cache; subsequent calls re-enable the cache and set the timeout and
77 .B ldap_disable_cache()
78 temporarily disables use of the cache (new
79 requests are not cached and the cache is not checked when returning
80 results). It does not delete the cache contents.
82 .B ldap_destroy_cache()
83 turns off caching and completely removes the cache from memory.
86 deletes the cache contents, but does not effect it in any other way.
88 .B ldap_uncache_entry()
89 removes all requests that make reference to the
90 distinguished name \fIdn\fP from the cache. It should be used, for
91 example, after doing an
93 call involving \fIdn\fP.
95 .B ldap_uncache_request()
96 removes the request indicated by the LDAP request
97 id \fImsgid\fP from the cache.
99 .B ldap_set_cache_options()
100 is used to change caching behavior. The current supported options are
101 .B LDAP_CACHE_OPT_CACHENOERRS
102 to suppress caching of any requests that result in an error, and
103 .B LDAP_CACHE_OPT_CACHEALLERRS
104 to enable caching of all requests. The default behavior is to not
105 cache requests that result in errors, except that request that result
107 .B LDAP_SIZELIMIT_EXCEEDED
110 .B ldap_enable_cache()
111 returns 0 upon success, and -1 if it is unable to
112 allocate space for the cache. All the other calls are declared as
113 void and return nothing.
120 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
122 is derived from University of Michigan LDAP 3.3 Release.