Skip to content

Commit 4da57a1

Browse files
committed
fix: use set/get on LRUCache
1 parent 6590012 commit 4da57a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/middleware-endpoint-discovery/src/updateDiscoveredEndpointInCache.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const updateDiscoveredEndpointInCache = async (
3030
} else {
3131
// put in a placeholder for endpoints already requested, prevent
3232
// too much in-flight calls.
33-
endpointCache.put(cacheKey, [
33+
endpointCache.set(cacheKey, [
3434
{
3535
Address: "",
3636
CachePeriodInMinutes: 1,
@@ -43,9 +43,9 @@ export const updateDiscoveredEndpointInCache = async (
4343
Identifiers: getEndpointDiscoveryId ? getEndpointDiscoveryId() : undefined,
4444
});
4545
const { Endpoints } = await client?.send(command);
46-
endpointCache.put(cacheKey, Endpoints);
46+
endpointCache.set(cacheKey, Endpoints);
4747
} catch (error) {
48-
endpointCache.put(cacheKey, [
48+
endpointCache.set(cacheKey, [
4949
{
5050
Address: "",
5151
CachePeriodInMinutes: 1, // Not to make more endpoint operation in next 1 minute

0 commit comments

Comments
 (0)