MAXTTL statement

Use the MAXTTL statement to specify the maximum amount of time the resolver can use resource information obtained from a Domain Name System (DNS) name server as part of resource resolution.

Tip: When MAXTTL is specified with NOCACHE, the value is ignored.

Syntax

Read syntax diagramSkip visual syntax diagramMAXTTL(2147483647)MAXTTL (time-to-live)

Parameters

time-to-live
Specifies the maximum amount of time, in seconds, that the resolver is permitted to use cached information about a resource obtained from a DNS name server. The time-to-live value must be in the range 1 - 2 147 483 647. The default is 2 147 483 647, which is the largest value that can be specified for the time-to-live value for a resource at a DNS name server. Specifying, or defaulting to, a value of 2 147 483 647 means that the resolver uses the time-to-live value received from the DNS name server to determine how long the resource information can be used.

Examples

The following code is an example of coding 10 minutes (or 600 seconds) as the maximum time-to-live value by using the MAXTTL statement:
MAXTTL(600) 

Usage notes

  • You can change the value for MAXTTL dynamically using the MODIFY RESOLVER,REFRESH,SETUP=resolver_setup_filename command. Changing the value of MAXTTL dynamically has no affect on existing records in the resolver cache, but the new value is used for cache records created after the MODIFY command completes.
  • The value for MAXTTL always applies to cache records that represent successful resolution attempts. The value for MAXTTL may also be used for negative cache records, unless the MAXNEGTTL statement is also specified. If a MAXNEGTTL is specified, that value is used as the maximum amount of time that negative cache entries are retained. See MAXNEGTTL statement for additional information.
  • If the time-to-live value that is received from the DNS name server for a given resource is lower than the MAXTTL value, the cached entry times out based on the DNS name server TTL value.
  • If the time-to-live value that is received from the DNS name server for a given resource is higher than the MAXTTL value, the cached entry times out based on the MAXTTL value