Skip to content

Commit 2c33adf

Browse files
Apply suggestions from code review
Co-authored-by: Marika Marszalkowski <[email protected]> Co-authored-by: David Knaack <[email protected]>
1 parent 341b309 commit 2c33adf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/connectivity/src/http-agent/http-agent.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
*/
305305
function 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
);

0 commit comments

Comments
 (0)