]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10270 slapo-pcache: negative cache entries are not loaded when pcachePersist...
authorAndrew Elble <aweits@rit.edu>
Fri, 11 Oct 2024 12:43:47 +0000 (08:43 -0400)
committerHoward Chu <hyc@openldap.org>
Thu, 27 Mar 2025 14:59:33 +0000 (14:59 +0000)
servers/slapd/overlays/pcache.c

index 9ef78fd6bf43bcf32228cd5de7d8afb61cb34582..9fd72e6d7261ff543474f9c58b2dbdde1671db1c 100644 (file)
@@ -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;