Class BoundedMapPackageFetchCache

A MapPackageFetchCache that evicts least-recently-used entries once it exceeds DEFAULT_MAP_PACKAGE_CACHE_LIMIT. The previous default cache was an unbounded Map, so a client that fetched many distinct packages grew it without bound (unlike the size-capped metadata cache). Callers that pass their own cache keep full control of eviction.

Hierarchy

Constructors

Properties

[toStringTag]: string
size: number

the number of elements in the Map.

[species]: MapConstructor

Methods

  • Returns an iterable of entries in the map.

    Returns MapIterator<[string, MapPackageFetchCacheEntry]>

  • Returns void

  • Parameters

    • key: string

    Returns boolean

    true if an element in the Map existed and has been removed, or false if the element does not exist.

  • Returns an iterable of key, value pairs for every entry in the map.

    Returns MapIterator<[string, MapPackageFetchCacheEntry]>

  • Executes a provided function once per each key/value pair in the Map, in insertion order.

    Parameters

    Returns void

  • Parameters

    • key: string

    Returns boolean

    boolean indicating whether an element with the specified key exists or not.

  • Returns an iterable of keys in the map

    Returns MapIterator<string>

  • Returns an iterable of values in the map

    Returns MapIterator<MapPackageFetchCacheEntry>