From bedac8bd605b39ec62b8bd7122f758758797c955 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 27 Jan 2006 22:55:28 +0000 Subject: [PATCH] Fix negative caching, only do it on Success --- servers/slapd/overlays/pcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index a1a5fdd725..0fc10352e1 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -1073,7 +1073,7 @@ pcache_response( } else if ( rs->sr_type == REP_RESULT ) { QueryTemplate* templ = (qm->templates)+si->template_id; if (( si->count && cache_entries( op, rs, &uuid ) == 0 ) || - ( !si->count && templ->negttl )) { + ( !si->count && templ->negttl && rs->sr_err == LDAP_SUCCESS )) { qm->addfunc(qm, &si->query, si->template_id, si->count ? &uuid : NULL); -- 2.39.5