Each and every DNS resource record carries an explicit TTL that specifies how long the information may be cached. In most situations, Squid has access to the TTL values and doesn’t store DNS answers longer than allowed. This is certainly true when you use Squid’s internal DNS implementation, which is enabled by default.
However, if you elect to use the (external) dnsserver processes, Squid may not receive TTL values for DNS answers. In this case, successful DNS answers are cached for the amount of time specified by this directive.
positive_dns_ttl 6 hours
positive_dns_ttl 1 hour