]> git.sur5r.net Git - openldap/commitdiff
ITS#6953 do not use the cache db when refreshing
authorRalf Haferkamp <ralf@openldap.org>
Thu, 26 May 2011 07:05:01 +0000 (09:05 +0200)
committerRalf Haferkamp <ralf@openldap.org>
Thu, 26 May 2011 08:53:27 +0000 (10:53 +0200)
servers/slapd/overlays/pcache.c

index 62477513bdbbaacf56813b9af044b2d0c68554b9..75ab887bdf6e9edaed0502ad648f3de87b1e07d7 100644 (file)
@@ -2891,6 +2891,8 @@ pcache_op_bind(
        return SLAP_CB_CONTINUE;
 }
 
+static slap_response refresh_merge;
+
 static int
 pcache_op_search(
        Operation       *op,
@@ -2929,7 +2931,8 @@ pcache_op_search(
        cm->db.be_acl = op->o_bd->be_acl;
 
        {
-               /* See if we're processing a Bind request */
+               /* See if we're processing a Bind request
+                * or a cache refresh */
                slap_callback *cb = op->o_callback;
 
                for ( ; cb; cb=cb->sc_next ) {
@@ -2937,6 +2940,10 @@ pcache_op_search(
                                pbi = cb->sc_private;
                                break;
                        }
+                       if ( cb->sc_response == refresh_merge ) {
+                               /* This is a refresh, do not search the cache */
+                               return SLAP_CB_CONTINUE;
+                       }
                }
        }