0

Best max-age setting?

I've just setup the NextDNS CLI on my Synology NAS and in the nextdns.conf file it says

cache-max-age 0s

I want to be using my cache as much as possible so is 0s a good setting? The other cache settings are:

cache-size 10MB
max-ttl 5s

I've been searching all morning for the answer, but am now going round in circles.

3 replies

null
    • Martheen
    • 4 mths ago
    • Reported - view

    max-ttl at 5 seconds force the *client* to almost always ask the local server, the idea is if you want to handle a false-positive or false negative then the client will query the local server anyway and no need to manually flush the cache.

    cache-max-age is about how long the cache stay at the local server, so yes, you want 0s (use the TTL from the nameserver)

    If you have more RAM in your NAS and plenty of devices at home you can experiment with bigger cache-size

    • R_P_M
    • 4 mths ago
    • Reported - view

    “nextdns config set help” will show you more details about all configuration options.

    The specific cache-max-age option refers to how long you want to keep expired entries passed their time (probably best to keep at 0 as no point in keeping expired ones).

    The max-ttl can be set all the way up to 2m (or could be 5m - memory a bit fuzzy at the moment).

    @martheen just posted while I was typing this out. 

    • Phillip_Deackes
    • 4 mths ago
    • Reported - view

    Thank you.  Everything is really snappy with this config so it must be good.

Content aside

  • 4 mths agoLast active
  • 3Replies
  • 100Views
  • 3 Following