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-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f00319b32c68e8e4c47dbcdcf73b230632502f90;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 9ef78fd6bf..9fd72e6d72 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;