Class CacheCollection<K, V>

A custom cache collection which has a max cache size.

Example

new CacheCollection();

Type Parameters

  • K

  • V

Hierarchy

  • Collection<K, V>
    • CacheCollection

Constructors

Properties

Methods

Constructors

  • Type Parameters

    • K

    • V

    Parameters

    • Optional maxSize: number

      The max size of the cache.

    • entries: null | Iterable<[K, V]> = []

      The initial entries of the cache.

    Returns CacheCollection<K, V>

Properties

maxSize?: number

The max size of the cache.

Methods