Least Recently Used (LRU) cache implementation

Type Parameters

  • T

    Type of cache keys

  • U

    Type of cache values

Constructors

Properties

Methods

Constructors

  • Type Parameters

    • T
    • U

    Parameters

    • maxSize: number = Infinity

    Returns LRUCache<T, U>

Properties

keys: T[] = []
map: Map<T, U> = ...
maxSize: number = Infinity

Methods

  • Parameters

    Returns undefined | U

  • Parameters

    Returns boolean

  • Parameters

    Returns void