mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
a4675f6f50
Insert a class before LDAPClient to cache the return value of get_entry() and certain exceptions (NotFound and EmptyResult). The cache uses an OrderedDict for the cases where a large cache might result an LRU model can be used. The cache be enabled (default) or disabled using ldap_cache=True/False. This cache is per-request so is not expected to grow particularly large except in the case of a large batch command. The key to the cache entry is the dn of the object being requested. Any write to or referencing a cached dn is evicted from the cache. The set of attributes is somewhat taken into consideration. "*" does not always match everything being asked for by a plugin so unless the requested set of attributes is a direct subset of what is cached it will be re-fetched. Err on the side of safety. Despite this rather conserative approach to caching 29% of queries are saved with ipatests/xmlrpc_tests/* https://pagure.io/freeipa/issue/8798 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com> |
||
---|---|---|
.. | ||
install | ||
__init__.py | ||
aci.py | ||
backend.py | ||
base.py | ||
capabilities.py | ||
cli.py | ||
config.py | ||
constants.py | ||
crud.py | ||
dns.py | ||
errors.py | ||
facts.py | ||
frontend.py | ||
krb_utils.py | ||
Makefile.am | ||
messages.py | ||
misc.py | ||
output.py | ||
parameters.py | ||
pkcs10.py | ||
plugable.py | ||
request.py | ||
rpc.py | ||
setup.cfg | ||
setup.py | ||
sysrestore.py | ||
text.py | ||
util.py | ||
x509.py |