Re: [squid-users] dns_ttl positive/negative Squid 3.5.10
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. Regards, Antony. -- "The future is already here. It's just not evenly distributed yet." - William Gibson Please reply to the list; please *don't* CC me. ___ squid-users mailing list squid-users@lists.squid-cache.org http://lists.squid-cache.org/listinfo/squid-users
Re: [squid-users] dns_ttl positive/negative Squid 3.5.10
> > 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 > test.google.com is not the best example, the domain google.com exist but not the subdomain So, same problem with gxxgle.fr Also, there is a DNS request from Squid at each force reload from browser Fred ___ squid-users mailing list squid-users@lists.squid-cache.org http://lists.squid-cache.org/listinfo/squid-users
Re: [squid-users] dns_ttl positive/negative Squid 3.5.10
> > 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. > Ok, I was focused on http://www.squid-cache.org/Doc/config/negative_dns_ttl so I missed that There is also a TTL for failed DNS lookups, I guess my problem is the same Arg .. Thank you Fred ___ squid-users mailing list squid-users@lists.squid-cache.org http://lists.squid-cache.org/listinfo/squid-users