npm.io
3.972.11 • Published 1 month ago

@aws-sdk/endpoint-cache

Licence
Apache-2.0
Version
3.972.11
Deps
2
Size
19 kB
Vulns
0
Weekly
0
Stars
3.7K

@aws-sdk/endpoint-cache

NPM version NPM downloads

Internal API

This is an internal package. That means this is used as a dependency for other, public packages, but should not be taken directly as a dependency in your application's package.json.

If you are updating the version of this package, for example to bring in a bug-fix, you should do so by updating your application lockfile with e.g. npm up @scope/package or equivalent command in another package manager, rather than taking a direct dependency.


EndpointCache

  • uses mnemonist/lru-cache for storing the cache.
  • the set operation stores milliseconds elapsed since the UNIX epoch in Expires param based on CachePeriodInMinutes provided in Endpoint.
  • the get operation returns all un-expired endpoints with their Expires values.
  • the getEndpoint operation returns a randomly selected un-expired endpoint.