Node.js DNS over HTTPS - :tangerine: Tangerine is the best drop-in replacement for dns.promises.Resolver using DNS over HTTPS ("DoH") via undici with built-in retries, timeouts, smart server rotation, AbortControllers, and caching support for multiple backends (with TTL and purge support). Made for @forwardemail.
When cache is retrieved, dependent on the type, if the result is not of the proper type (e.g. it's an Array instead of an Object) then set data = undefined which will cause the cache to be purged/reset. This was a feature we built-in to Forward Email when we used to use dns.promises.Resolver.
Note: this is a super edge case, but is dummy-proofing in case of a bad redis set, or if a developer manually edited the cache value for whatever reason.
Checklist
[x] I have searched through GitHub issues for similar issues.
[x] I have completely read through the README and documentation.
Describe the feature
When cache is retrieved, dependent on the type, if the result is not of the proper type (e.g. it's an Array instead of an Object) then set
data = undefined
which will cause the cache to be purged/reset. This was a feature we built-in to Forward Email when we used to usedns.promises.Resolver
.Note: this is a super edge case, but is dummy-proofing in case of a bad redis set, or if a developer manually edited the cache value for whatever reason.
Checklist