From: Alex Rousskov Date: Mon, 18 Feb 2013 23:09:08 +0000 (-0700) Subject: Enable non-SMP collapsed forwarding by making miss entries public ASAP, X-Git-Tag: SQUID_3_5_0_1~444^2~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87890a69acb9a4c10ab0afd80f6a5e092c6d9c5b;p=thirdparty%2Fsquid.git Enable non-SMP collapsed forwarding by making miss entries public ASAP, before the response headers become known. --- diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 7995e5837e..afaa2fb32f 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -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