You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 13, 2021. It is now read-only.
Let's say I cache all the results for an hour. What would happen if you get a bad hostname that the library is not able to resolve for a minute but is available later. Would the bad result be cached for an hour?
Example:
Default config:
dnscache = require('dnscache')({
"enable" : true,
"ttl" : 3600,
"cachesize" : 1000
});
Time 0: Hostname - cannot be resolved
dnscache.lookup(hostname ..) => err (would the bad host be cached?)
Time 5: Hostname - all up and ready to be resolved
dnscache.lookup(hostname ..) => ? (would it pick up from the cache?)
If there is a way you could provide to clean up the cache
If you could add more documentation regarding the use of this library it would be appreciated. Like to return the value we need a callback or a promise based interface. The function is async ..