From: wessels <> Date: Sat, 2 Nov 1996 01:19:08 +0000 (+0000) Subject: From: Arjan de Vet X-Git-Tag: SQUID_3_0_PRE1~5546 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e61d864a4d2ebeb53dee76d8cf89f109be93cbb5;p=thirdparty%2Fsquid.git From: Arjan de Vet In ipcache_gethostbyname the following patch should be applied to avoid lookups for IP numbers being counted as misses. My hit/miss ratio was very strange before I applied this patch :-). --- diff --git a/src/ipcache.cc b/src/ipcache.cc index f203becb2d..a5c5beda06 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -1,5 +1,5 @@ /* - * $Id: ipcache.cc,v 1.80 1996/10/30 18:43:22 wessels Exp $ + * $Id: ipcache.cc,v 1.81 1996/11/01 18:19:08 wessels Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -819,9 +819,9 @@ ipcache_gethostbyname(char *name, int flags) return &i->addrs; } } - IpcacheStats.misses++; if ((addrs = ipcacheCheckNumeric(name))) return addrs; + IpcacheStats.misses++; if (BIT_TEST(flags, IP_BLOCKING_LOOKUP)) { IpcacheStats.ghbn_calls++; debug(14, 3, "ipcache_gethostbyname: blocking on gethostbyname() for '%s'\n", name);