fix(dnscaching): check dnsCache before init & support forceipv4 with caching (#1910)

* fix: ensure dnsCache is checked for when its enabled before initialization

previously dnsCache was being initialized even if it was disabled because the previous check was
always returning truthy.

fix #1857

* chore: update dns-caching to 0.2.6

This will allow dns-caching to respect forceIpv4 flag.

* chore: update dns-caching to 0.2.7
This commit is contained in:
fallenbagel
2025-09-18 16:30:42 +05:00
committed by GitHub
parent cd479d0d17
commit 9e737576de
3 changed files with 280 additions and 260 deletions

View File

@@ -82,7 +82,7 @@ app
}
// Add DNS caching
if (settings.network.dnsCache) {
if (settings.network.dnsCache?.enabled) {
initializeDnsCache({
forceMinTtl: settings.network.dnsCache.forceMinTtl,
forceMaxTtl: settings.network.dnsCache.forceMaxTtl,