@tspro/ts-utils-lib
    Preparing search index...

    Class LRUCache<K, V>

    LRUCache is an implementation of least recently used cache with a fixed capacity.

    Type Parameters

    • K extends string
    • V
    Index

    Constructors

    Methods

    Constructors

    • Type Parameters

      • K extends string
      • V

      Parameters

      • maxSize: number
      • maxKeyLength: number = Infinity

      Returns LRUCache<K, V>

    Methods

    • Parameters

      • key: K

      Returns undefined | V

    • Parameters

      • key: K
      • value: V

      Returns void