Add --use-stale-cache option.

This commit is contained in:
Simon Kelley
2022-08-29 21:44:05 +01:00
parent d21438a7df
commit d334e7c34f
8 changed files with 238 additions and 76 deletions

View File

@@ -812,6 +812,12 @@ Disable negative caching. Negative caching allows dnsmasq to remember
"no such domain" answers from upstream nameservers and answer
identical queries without forwarding them again.
.TP
.B --use-stale-cache
When set, if a DNS name exists in the cache, but its time-to-live has expired, dnsmasq will return the data anyway. (It attempts to refresh the
data with an upstream query after returning the stale data.) This can improve speed and reliability. It comes at the expense
of sometimes returning out-of-date data and less efficient cache utilisation, since old data cannot be flushed when its TTL expires, so the cache becomes
strictly least-recently-used.
.TP
.B \-0, --dns-forward-max=<queries>
Set the maximum number of concurrent DNS queries. The default value is
150, which should be fine for most setups. The only known situation