From: Howard Chu Date: Fri, 27 Jan 2006 22:55:28 +0000 (+0000) Subject: Fix negative caching, only do it on Success X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~262 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bedac8bd605b39ec62b8bd7122f758758797c955;p=openldap Fix negative caching, only do it on Success --- 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);