logoalt Hacker News

pocksuppetyesterday at 2:55 AM1 replyview on HN

You don't have to obey TTL. You can use Unbound options like:

    cache-min-ttl: 3600 // seconds
    cache-min-negative-ttl: 3600 // seconds
or

    serve-expired: yes
    serve-expired-client-timeout: 20 // milliseconds to wait for resolution before serving the old value to the client

Replies

clownstrikelolyesterday at 2:03 PM

Can also have unbound preemptively refresh cached values too...

    prefetch: yes
Tada, now your unbound serves records faster than the round trip out to anything off your own network in most cases.