[squid-users] dns_ttl positive/negative Squid 3.5.10

Antony Stone Antony.Stone at squid.open.source.it
Mon Nov 2 15:47:53 UTC 2015

On Monday 02 November 2015 at 16:39:45, FredB wrote:

> I want to reduce DNS requests, so I'm trying with
> positive_dns_ttl 6 hours
> And
> negative_dns_ttl 4 hours

> If I try a false domain like test.google.com there is a response from my
> DNS Servail, so ok But if I retry after a short time - maybe one minute -
> there is again a DNS request
> Same thing with positive_dns_ttl, Squid respects the TTL from DNS

From http://www.squid-cache.org/Doc/config/positive_dns_ttl/

"Upper limit on how long Squid will cache positive DNS responses."

Note: "Upper limit" - not "lower limit", or "forced value".

So, if the DNS response gives you a TTL of 15 minutes, and you've specified an 
upper limit of 6 hours, the result is 15 minutes.

The TTL on looking up "test.google.com" is 60 seconds, so you can make your 
cache time shorter than that, but you can't make it longer.



"The future is already here.   It's just not evenly distributed yet."

 - William Gibson

                                                   Please reply to the list;
                                                         please *don't* CC me.

More information about the squid-users mailing list