📄 ldap_cache.3
字号:
.TH LDAP_CACHE 3 "22 September 1998" "OpenLDAP LDVERSION".\" $OpenLDAP: pkg/ldap/doc/man/man3/ldap_cache.3,v 1.2.12.3 2001/06/14 00:05:14 kurt Exp $.\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved..\" Copying restrictions apply. See COPYRIGHT/LICENSE..SH NAMEldap_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.SH SYNOPSIS.nf.ft B#include <ldap.h>.ft.LP.ft Bldap_enable_cache( ld, timeout, maxmem ).ftLDAP *ld;long timeout;long maxmem;.LP.ft Bvoid ldap_disable_cache( ld ).ftLDAP *ld;.LP.ft Bvoid ldap_destroy_cache( ld ).ftLDAP *ld;.LP.ft Bvoid ldap_flush_cache( ld ).ftLDAP *ld;.LP.ft Bvoid ldap_uncache_entry( ld, dn ).ftLDAP *ld;char *dn;.LP.ft Bvoid ldap_uncache_request( ld, msgid ).ftLDAP *ld;int msgid;.LP.ft Bvoid ldap_set_cache_options( ld, opts ).ftLDAP *ld;unsigned long opts;.fi.SH DESCRIPTION.LPThese routines are used to control the behavior of the.B experimentalclient caching of.BR ldap_search (3)and.BR ldap_compare (3)operations. Bydefault, the cache is disabled and no caching is done. Enabling thecache can greatly improve performance and reduce network bandwidth whena client DUA makes repeated requests..LP.B ldap_enable_cache()should be called to turn on local caching or tochange cache parameters (lifetime of cached requests and memory used).The \fIld\fP parameter should be the result of a successful call to.BR ldap_open (3).The \fItimeout\fP is specified in seconds, and is used todecide how long to keep cached requests. The \fImaxmem\fP value is inbytes, and is used to set an upper bound on how memory the cache willuse. You can specify 0 for \fImaxmem\fP to restrict the cache size bythe \fItimeout\fP only. The first call to ldap_enable_cache createsthe cache; subsequent calls re-enable the cache and set the timeout andmemory values..LP.B ldap_disable_cache()temporarily disables use of the cache (newrequests are not cached and the cache is not checked when returningresults). It does not delete the cache contents..LP.B ldap_destroy_cache()turns off caching and completely removes the cache from memory..LP.B ldap_flush_cache()deletes the cache contents, but does not effect it in any other way..LP.B ldap_uncache_entry()removes all requests that make reference to thedistinguished name \fIdn\fP from the cache. It should be used, forexample, after doing an.BR ldap_modify (3)call involving \fIdn\fP..LP.B ldap_uncache_request()removes the request indicated by the LDAP requestid \fImsgid\fP from the cache..LP.B ldap_set_cache_options()is used to change caching behavior. The current supported options are.B LDAP_CACHE_OPT_CACHENOERRSto suppress caching of any requests that result in an error, and.B LDAP_CACHE_OPT_CACHEALLERRSto enable caching of all requests. The default behavior is to notcache requests that result in errors, except that request that resultin the error.B LDAP_SIZELIMIT_EXCEEDEDare cached..SH ERRORS.B ldap_enable_cache()returns 0 upon success, and -1 if it is unable toallocate space for the cache. All the other calls are declared asvoid and return nothing..SH SEE ALSO.BR ldap (3),.BR ldap_search (3),.BR ldap_compare (3).SH ACKNOWLEDGEMENTS.B OpenLDAPis developed and maintained by The OpenLDAP Project (http://www.openldap.org/)..B OpenLDAPis derived from University of Michigan LDAP 3.3 Release.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -