]> git.sur5r.net Git - openldap/commitdiff
Fix negative caching again, be sure it's really from zero entries returned
authorHoward Chu <hyc@openldap.org>
Thu, 2 Feb 2006 02:52:54 +0000 (02:52 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 2 Feb 2006 02:52:54 +0000 (02:52 +0000)
servers/slapd/overlays/pcache.c

index e41ee6ddaf43143412e9e8e66835ede0b6f1f565..bbff68b23ce34ca8ddb7c3b2763504e2bbb7efa8 100644 (file)
@@ -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);