]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Enable non-SMP collapsed forwarding by making miss entries public ASAP,
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 18 Feb 2013 23:09:08 +0000 (16:09 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 18 Feb 2013 23:09:08 +0000 (16:09 -0700)
before the response headers become known.

src/client_side_reply.cc

index 7995e5837e2cd0888af2169582dfff481619cff9..afaa2fb32ffee610ac18c83d2de2a669bd60b2e8 100644 (file)
@@ -2200,6 +2200,15 @@ clientReplyContext::createStoreEntry(const HttpRequestMethod& m, RequestFlags re
     /* So, we mark the store logic as complete */
     flags.storelogiccomplete = 1;
 
+    // TODO: why is !.needValidation required here?
+    if (Config.onoff.collapsed_forwarding && reqFlags.cachable &&
+        !reqFlags.needValidation &&
+        (m == Http::METHOD_GET || m == Http::METHOD_HEAD)) {
+        // make the entry available to others
+        debugs(88, 3, "allow collapsing: " << *e);
+        e->makePublic();
+    }
+
     /* and get the caller to request a read, from whereever they are */
     /* NOTE: after ANY data flows down the pipe, even one step,
      * this function CAN NOT be used to manage errors