Some DNS servers responds with a ttl=0 asking their results to not be cached
for long, but due to historical reasons from before when Squid had an internal
DNS client such DNS responses got cached for the positive DNS ttl (default 1 hour).
Witch this change such DNS responses gets cached for the minimum allowed TTL
(negative_dns_ttl, default 1 minute).
/*
- * $Id: fqdncache.cc,v 1.174 2007/09/17 09:05:52 hno Exp $
+ * $Id: fqdncache.cc,v 1.175 2007/10/13 00:02:28 hno Exp $
*
* DEBUG: section 35 FQDN Cache
* AUTHOR: Harvest Derived
return 0;
}
- if (ttl == 0 || ttl > Config.positiveDnsTtl)
+ if (ttl > Config.positiveDnsTtl)
ttl = Config.positiveDnsTtl;
if (ttl < Config.negativeDnsTtl)
/*
- * $Id: ipcache.cc,v 1.263 2007/09/17 09:05:52 hno Exp $
+ * $Id: ipcache.cc,v 1.264 2007/10/13 00:02:28 hno Exp $
*
* DEBUG: section 14 IP Cache
* AUTHOR: Harvest Derived
else
i->addrs.count = 255;
- if (ttl == 0 || ttl > Config.positiveDnsTtl)
+ if (ttl > Config.positiveDnsTtl)
ttl = Config.positiveDnsTtl;
if (ttl < Config.negativeDnsTtl)