Name

positive_dns_ttl

Synopsis

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.

Syntax

positive_dns_ttl time-specification

Default

positive_dns_ttl 6 hours

Example

positive_dns_ttl 1 hour

Related

negative_dns_ttl

Get Squid: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.