File tree Expand file tree Collapse file tree
packages/connectivity/src/http-agent Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -292,14 +292,14 @@ function validateFormat(certificate: DestinationCertificate) {
292292 * Exported for testing purposes only.
293293 * @internal
294294 */
295- export const agentCreateCache = new Cache < HttpAgentConfig | HttpsAgentConfig > (
295+ export const agentCache = new Cache < HttpAgentConfig | HttpsAgentConfig > (
296296 3600000 , // 1 hour
297297 100 // max 100 LRU-cached agents
298298) ;
299299
300300/**
301301 * @internal
302- * Agents are cache for up to one hour, but can be evicted earlier if more than 100 agents are created.
302+ * Agents are cached for up to one hour, but can be evicted earlier if more than 100 agents are created.
303303 * See https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener for details on the possible options
304304 */
305305function createAgent (
@@ -309,7 +309,7 @@ function createAgent(
309309 const protocol = getProtocolOrDefault ( destination ) ;
310310 const cacheKey = hashCacheKey ( { protocol, options } ) ;
311311
312- return agentCreateCache . getOrInsertComputed ( cacheKey , ( ) => {
312+ return agentCache . getOrInsertComputed ( cacheKey , ( ) => {
313313 logger . debug (
314314 `Creating new ${ protocol . toUpperCase ( ) } agent for destination ${ destination . name || '<unknown>' } `
315315 ) ;
You can’t perform that action at this time.
0 commit comments