From: Amos Jeffries Date: Sun, 24 Jul 2011 13:24:24 +0000 (-0600) Subject: Enable negative cacheing on unknown or -1 expiry timestamp X-Git-Tag: SQUID_3_1_15~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad92a44716c58a29239538ba9fd33938fd7a09ac;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 7d40515e35..be313eb331 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1431,7 +1431,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 HTTP_VIOLATIONS expires = squid_curtime + Config.negativeTtl; #else