Mon Oct 18 20:21:38 CEST 1999 Modified Files in squid/src client_side.c Two changes in how IP-cache entries are invalidated a) Have PURGE also purge the IP-cache from any (valid or not) DNS entry. b) Release negatively cached DNS entries on reload regardless if Squid has the reloaded object cached or not. Index: squid/src/client_side.c diff -u squid/src/client_side.c:1.1.1.43.2.9 squid/src/client_side.c:1.1.1.43.2.10 --- squid/src/client_side.c:1.1.1.43.2.9 Sat Oct 2 01:15:18 1999 +++ squid/src/client_side.c Mon Oct 18 20:21:36 1999 @@ -572,6 +572,8 @@ return; } http->log_type = LOG_TCP_MISS; + /* Release both IP and object cache entries */ + ipcacheInvalidate(http->request->host); if ((entry = storeGetPublic(http->uri, METHOD_GET)) == NULL) { http->http_code = HTTP_NOT_FOUND; } else { @@ -1829,6 +1831,13 @@ /* We can generate a HEAD reply from a cached GET object */ e = http->entry = storeGetPublic(http->uri, METHOD_GET); } + /* Release negatively cached IP-cache entries on reload */ + if (r->flags.nocache) + ipcacheReleaseInvalid(r->host); +#if HTTP_VIOLATIONS + else if (r->flags.nocache_hack) + ipcacheReleaseInvalid(r->host); +#endif #if USE_CACHE_DIGESTS http->lookup_type = e ? "HIT" : "MISS"; #endif @@ -1854,12 +1863,6 @@ return LOG_TCP_HIT; } #if HTTP_VIOLATIONS - if (r->flags.nocache_hack) { - /* if nocache_hack is set, nocache should always be clear, right? */ - assert(!r->flags.nocache); - ipcacheReleaseInvalid(r->host); - /* continue! */ - } if (e->store_status == STORE_PENDING) { if (r->flags.nocache || r->flags.nocache_hack) { debug(33, 3) ("Clearing no-cache for STORE_PENDING request\n\t%s\n",