Do not cache certain domains

tale d.lawrence at
Thu Sep 10 15:43:51 UTC 2020

On Mon, Sep 7, 2020 at 6:01 PM Ben Lavender <ben at> wrote:
> Without having to alter the TTL of the existing RRs as well as the
> default TTL. I know this can be done using cache-max-ttl to limit the
> whole cache, but can this be done for say one single or multiple defined
> domains only?

AFAIK there's no specially designed way to handle this, so achieving it will
basically mean cobbling some parts together.

max-cache-ttl is usable in a view statement, and each view by default gets its
own cache.

With the caveat that this might not be the best way and I haven't
actually tested it,
I'd try this.  Set up a view that bound a listener to an interface
alias on your host,
and inside that view clamp down max-cache-ttl however you like.   Back in your
main configuration set up the zone(s) to forward to that private listener.

I think even on the first hit, the TTL that your main resolver sees
will be the one
that got clamped in the view resolver, but I'm not positive about that.

You will also get double the number of cache entries for each lookup, of course.

More information about the bind-users mailing list