public DnsCacheBuilder ttl(int minTtl, int maxTtl) {
        checkArgument(minTtl >= 0 && minTtl <= maxTtl,
                      "minTtl: %s, maxTtl: %s (expected: 0 <= minTtl <= maxTtl)", minTtl, maxTtl);
        this.minTtl = minTtl;
        this.maxTtl = maxTtl;
        return this;
    }
Sets the minimum and maximum TTL of the cached DNS resource records in seconds. If the TTL of the DNS
resource record returned by the DNS server is less than the minimum TTL or greater than the maximum TTL,
this resolver will ignore the TTL from the DNS server and use the minimum TTL or the maximum TTL instead
respectively.
The default value is {@code 1} and {@link Integer#MAX_VALUE}, which practically tells this resolver to
respect the TTL from the DNS server.

<p>Note that if {@code maxTtl} is set to {@code 0}, the resolved DNS records are not cached.
core/src/main/java/com/linecorp/armeria/client/DnsCacheBuilder.java