From: Amos Jeffries Date: Thu, 21 Jul 2011 12:02:28 +0000 (+1200) Subject: Enable negative cacheing on unknown or -1 expiry timestamp X-Git-Tag: take08~55^2~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=da03a7e01d9a222c8173893c7184aefd6d746aa0;p=thirdparty%2Fsquid.git Enable negative cacheing on unknown or -1 expiry timestamp This syncs the squid-3 code with what squid-2 does. THere seem to be no problems in squid-2, but squid-3 does not cache at times when it should according to negative_ttl --- diff --git a/src/store.cc b/src/store.cc index 94e382e663..039903cd30 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1448,7 +1448,9 @@ StoreEntry::checkNegativeHit() const void StoreEntry::negativeCache() { - if (expires == 0) + // XXX: should make the default for expires 0 instead of -1 + // so we can distinguish "Expires: -1" from nothing. + if (expires <= 0) #if USE_HTTP_VIOLATIONS expires = squid_curtime + Config.negativeTtl; #else