-
Notifications
You must be signed in to change notification settings - Fork 35
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
feat: implement local dns cache #132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with two very small suggestions that you can take or leave, approved either way.
verbatim: true, | ||
} | ||
|
||
const lookupCache = exports.lookupCache = new LRUCache({ max: 50 }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any input on what this number should be, but I'm curious on what factors would lead us to change this. Do we have a target package-lock.json that would install without evicting any DNS cache entries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is per-host, so unless you have more than 50 hosts you're making requests to in a single package-lock this should be just fine. also the lru-cache behaviors mean even if you did unless there's an even distribution you'll end up hitting the cache for the majority of requests anyway.
closes npm/statusboard#441