-
-
Notifications
You must be signed in to change notification settings - Fork 957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dnsCache: true
has no effect
#1372
Comments
we have such bug in our applications |
I think one workaround would be to provide your own import got from 'got';
import CacheableLookup from 'cacheable-lookup';
const dnsCache = new CacheableLookup();
setInterval(() => {
got('https://google.com', { dnsCache }).then(response =>{
console.log(`${response.body},`);
});
}, 1000); |
Thank you @known-as-bmf the workaround seems to work, but i'd like to see this fixed in got as well. |
I'll look at this later today. |
const instance = got.extend({dnsCache: true});
instance('https://google.com').then(response =>{
console.log(`${response.body.length}`);
}); Works. So that means |
This also causes a memory leak. Good spot! |
@szmarczak thank you fixing this when can we have a release with the fix in it? |
I'll do one tomorrow. |
@szmarczak sorry to bug you further, is there anything that is blocking a tag release? |
Sorry it took so long. Released |
Thank you @szmarczak ! |
I got your email. I'm pretty sure I made also an NPM release... Weird, I access publish anymore and when I try to log in it loads indefinitely. @sindresorhus Can you try to publish a new NPM version ( |
@szmarczak Done. I think it failed because npm had some downtime. |
thank you @sindresorhus and @szmarczak ! |
Describe the bug
I'm trying to enable DNS cache for my app but looking at the DNS requests using tcdump the DNS TTL isn't respected.
Actual behavior
DNS TTL isn't respected
Expected behavior
DNS TTL is respected
Code to reproduce
npm install got
you can see the DNS requests going on using tcpdump:
Checklist
The text was updated successfully, but these errors were encountered: