From: Howard Chu Date: Thu, 2 Feb 2006 02:52:54 +0000 (+0000) Subject: Fix negative caching again, be sure it's really from zero entries returned X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~251 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=57c25cbd68f6456868adc45c87030380c3e6abfe;p=openldap Fix negative caching again, be sure it's really from zero entries returned --- diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index e41ee6ddaf..bbff68b23c 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -1068,7 +1068,8 @@ 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 && rs->sr_err == LDAP_SUCCESS )) { + ( templ->negttl && !si->count && !si->over && + rs->sr_err == LDAP_SUCCESS )) { qm->addfunc(qm, &si->query, si->template_id, si->count ? &uuid : NULL);