Add CacheableDnsHttpAgent.install()

This commit is contained in:
Louis Lam 2022-07-18 23:32:45 +08:00
parent 8f7b7e74c9
commit 17ed051401
2 changed files with 5 additions and 1 deletions

View File

@ -68,7 +68,7 @@
"badge-maker": "^3.3.1", "badge-maker": "^3.3.1",
"bcryptjs": "~2.4.3", "bcryptjs": "~2.4.3",
"bree": "~7.1.5", "bree": "~7.1.5",
"cacheable-lookup": "^6.0.4", "cacheable-lookup": "~6.0.4",
"chardet": "^1.3.0", "chardet": "^1.3.0",
"check-password-strength": "^2.0.5", "check-password-strength": "^2.0.5",
"cheerio": "^1.0.0-rc.10", "cheerio": "^1.0.0-rc.10",

View File

@ -17,6 +17,10 @@ class CacheableDnsHttpAgent {
this.cacheable.install(https.globalAgent); this.cacheable.install(https.globalAgent);
} }
static install(agent) {
this.cacheable.install(agent);
}
/** /**
* @var {https.AgentOptions} agentOptions * @var {https.AgentOptions} agentOptions
* @return {https.Agent} * @return {https.Agent}