Effect DNS Resolver Cache
A recursive resolver that caches both answers and their absence. Every uncached lookup walks root to TLD to authoritative, three hops before your app sends a byte; the cache collapses that to zero hops until the record's per-name TTL expires, so a rotated IP still propagates on the authority's schedule. NXDOMAIN is the answer nobody caches by default, so a typo'd host in a hot loop re-walks the recursion every time; negative caching (RFC 2308) stores the non-existence with its own shorter TTL. The demo: 41 lookups cost 3 upstream queries, and a nonexistent name's 31 repeats cost 3. Pinned to effect 4.0.0-beta.98.
npx shadcn@latest add https://ui.aryank.space/r/effect-dns-resolver-cache.jsonInstalls from ui.aryank.space. To add it by hand, copy the files in Files below, or register the @compronents namespace via the docs.
Every lookup walks root, TLD, and authority: three hops before your app sends a byte. Forty-one lookups of one name cost 123 upstream queries.