Skip to content

Commit b2e083f

Browse files
agnersclaude
andauthored
Disable negative caching for local.hass.io (#202)
* Disable negative caching for local.hass.io When a name under local.hass.io is queried before Supervisor's hosts file entry is picked up (e.g. right after an add-on started), the resulting NXDOMAIN is negative-cached for ~5s, prolonging resolution failures even after the hosts entry became visible. Disable caching of denial responses for local.hass.io. Positive answers are still cached, and entries for these names live in the local hosts file anyway, so negative caching provides no benefit here. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Apply negative caching exception to fallback corefile as well The static /etc/corefile is used when tempio fails to render the template; keep its cache block in sync. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 67ce413 commit b2e083f

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

rootfs/etc/corefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
max_fails 5
2222
}
2323
fallback REFUSED,SERVFAIL,NXDOMAIN . dns://127.0.0.1:5553
24-
cache
24+
cache {
25+
disable denial local.hass.io
26+
}
2527
}
2628

2729
.:5553 {

rootfs/usr/share/tempio/corefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
max_fails 5
2323
}
2424
{{ if .fallback }}fallback REFUSED,SERVFAIL,NXDOMAIN . dns://127.0.0.1:5553{{ end }}
25-
cache
25+
cache {
26+
disable denial local.hass.io
27+
}
2628
}
2729

2830
.:5553 {

0 commit comments

Comments
 (0)