Feature Request - DNSMASQ USE-STALE-CACHE

Started by alive.wave3183, May 20, 2025, 12:07:51 AM

Previous topic - Next topic
Requesting the following feature to be added to the GUI. I'm using extras config manually adding this in, but feel like it's a valuable feature for those only using forwarding with DNSMASQ. A similar feature is already exposed for unbound in opnsense GUI.

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 mostly least-recently-used. To mitigate issues caused by massively outdated DNS replies, the maximum overaging of cached records can be specified in seconds (defaulting to not serve anything older than one day). Setting the TTL excess time to zero will serve stale cache data regardless how long it has expired.

Thanks for the feedback. Please open a feature request on github.
Hardware:
DEC740