From: Andrew Elble Date: Fri, 11 Oct 2024 12:43:47 +0000 (-0400) Subject: ITS#10270 slapo-pcache: negative cache entries are not loaded when pcachePersist... X-Git-Tag: OPENLDAP_REL_ENG_2_5_20~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e716257b8bdf8d3ed797367564fb8c69a2fe84e3;p=thirdparty%2Fopenldap.git ITS#10270 slapo-pcache: negative cache entries are not loaded when pcachePersist is on --- diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index ef32c4521d..73fabe767b 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -802,7 +802,11 @@ url2query( goto error; } - cq = add_query( op, qm, &query, qt, PC_POSITIVE, 0 ); + if (BER_BVISNULL( &uuid )) { + cq = add_query( op, qm, &query, qt, PC_NEGATIVE, 0 ); + } else { + cq = add_query( op, qm, &query, qt, PC_POSITIVE, 0 ); + } if ( cq != NULL ) { cq->expiry_time = expiry_time; cq->refresh_time = refresh_time;