summaryrefslogtreecommitdiffstats
path: root/src/responder/common/responder_common.c
diff options
context:
space:
mode:
authorFabiano Fidêncio <fidencio@redhat.com>2017-02-22 08:07:45 +0100
committerJakub Hrozek <jhrozek@redhat.com>2017-03-14 12:35:01 +0100
commit8bb6680637ead03e24a38d15ec5265d11a920a1d (patch)
treef5e4cc597dcf9012c54fd4e83a25e27029d8558b /src/responder/common/responder_common.c
parent9286d0d4143bcb4e36b91022107e307998122bbb (diff)
downloadsssd-8bb6680637ead03e24a38d15ec5265d11a920a1d.tar.gz
sssd-8bb6680637ead03e24a38d15ec5265d11a920a1d.tar.xz
sssd-8bb6680637ead03e24a38d15ec5265d11a920a1d.zip
CACHE_REQ: Check the caches first
This patch introduces a new configurable option to define whether the responder should query all domains' caches before querying the Data Providers. This new option is called cache_first and, by default, it's disabled, meaning that, for each provider, the responder may contact the cache and the data provider in the same iteration. Co-Author: Pavel Březina <pbrezina@redhat.com> Related: https://pagure.io/SSSD/sssd/issue/3001 Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/responder/common/responder_common.c')
-rw-r--r--src/responder/common/responder_common.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
index 5c59f0d8f..76f436096 100644
--- a/src/responder/common/responder_common.c
+++ b/src/responder/common/responder_common.c
@@ -1101,6 +1101,17 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
}
}
+ ret = confdb_get_bool(rctx->cdb, rctx->confdb_service_path,
+ CONFDB_RESPONDER_CACHE_FIRST,
+ false, &rctx->cache_first);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_OP_FAILURE,
+ "Cannot get \"cache_first_option\".\n"
+ "Querying the caches first before querying the "
+ "Data Providers will not be enforced [%d]: %s.\n",
+ ret, sss_strerror(ret));
+ }
+
ret = confdb_get_int(rctx->cdb, rctx->confdb_service_path,
CONFDB_RESPONDER_GET_DOMAINS_TIMEOUT,
GET_DOMAINS_DEFAULT_TIMEOUT, &rctx->domains_timeout);