From: wessels <> Date: Tue, 27 Nov 2007 05:20:04 +0000 (+0000) Subject: Bug 2096: allow pending cache hits when delay pools not compiled in X-Git-Tag: SQUID_3_0_STABLE1~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5bf4d170c57075bba1849dffd656bb75cd980d71;p=thirdparty%2Fsquid.git Bug 2096: allow pending cache hits when delay pools not compiled in For some time now, Squid has marked pending cache hits (a cache hit when e->store_status != STORE_OK) as LOG_TCP_MISS. This was done so that pending hits do not bypass delay pools. It had the negative side effect of generating confusing access.log entries because cache hits get logged as miss. With this patch, the behavior is reverted when delay pools are not compiled in. Pending hits will be logged as some kind of TCP_HIT. Users of delay pools will just have to live with this logging quirk, although the "forwarded to" field of access.log can always be used to see if the request was forwarded (a miss) or not (a hit). --- diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index bca837ca14..8646dc76b6 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side_reply.cc,v 1.142 2007/11/15 23:33:05 wessels Exp $ + * $Id: client_side_reply.cc,v 1.143 2007/11/26 22:20:04 wessels Exp $ * * DEBUG: section 88 Client-side Reply Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -636,9 +636,12 @@ clientReplyContext::cacheHit(StoreIOBuffer result) * plain ol' cache hit */ ++#if DELAY_POOLS if (e->store_status != STORE_OK) http->logType = LOG_TCP_MISS; - else if (e->mem_status == IN_MEMORY) + else +#endif + if (e->mem_status == IN_MEMORY) http->logType = LOG_TCP_MEM_HIT; else if (Config.onoff.offline) http->logType = LOG_TCP_OFFLINE_HIT;