Fix negative caching, only do it on Success

This commit is contained in:
Howard Chu 2006-01-27 22:55:28 +00:00
parent fdfd5e7ec0
commit bedac8bd60

View File

@ -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);