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 the
62 default, the cache is disabled and no caching is done. Enabling the
63 cache can greatly improve performance and reduce network bandwidth when
64 a client DUA makes repeated requests.
66 .B ldap_enable_cache()
67 should be called to turn on local caching or to
68 change cache parameters (lifetime of cached requests and memory used).
69 The \fIld\fP parameter should be the result of a successful call to
71 The \fItimeout\fP is specified in seconds, and is used to
72 decide how long to keep cached requests. The \fImaxmem\fP value is in
73 bytes, and is used to set an upper bound on how memory the cache will
74 use. You can specify 0 for \fImaxmem\fP to restrict the cache size by
75 the \fItimeout\fP only. The first call to ldap_enable_cache creates
76 the cache; subsequent calls re-enable the cache and set the timeout and
79 .B ldap_disable_cache()
80 temporarily disables use of the cache (new
81 requests are not cached and the cache is not checked when returning
82 results). It does not delete the cache contents.
84 .B ldap_destroy_cache()
85 turns off caching and completely removes the cache from memory.
88 deletes the cache contents, but does not effect it in any other way.
90 .B ldap_uncache_entry()
91 removes all requests that make reference to the
92 distinguished name \fIdn\fP from the cache. It should be used, for
93 example, after doing an
95 call involving \fIdn\fP.
97 .B ldap_uncache_request()
98 removes the request indicated by the LDAP request
99 id \fImsgid\fP from the cache.
101 .B ldap_set_cache_options()
102 is used to change caching behavior. The current supported options are
103 .B LDAP_CACHE_OPT_CACHENOERRS
104 to suppress caching of any requests that result in an error, and
105 .B LDAP_CACHE_OPT_CACHEALLERRS
106 to enable caching of all requests. The default behavior is to not
107 cache requests that result in errors, except that request that result
109 .B LDAP_SIZELIMIT_EXCEEDED
112 .B ldap_enable_cache()
113 returns 0 upon success, and -1 if it is unable to
114 allocate space for the cache. All the other calls are declared as
115 void and return nothing.
122 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
124 is derived from University of Michigan LDAP 3.3 Release.