Options
All
  • Public
  • Public/Protected
  • All
Menu

Implementation for a simple in-memory cache data structure

Type parameters

  • V = unknown

    value type

  • K = string

    key type (string by default)

Hierarchy

Implements

Index

Constructors

  • Type parameters

    • V = unknown

    • K = string

    Returns default<V, K>

Properties

storage: Map<K, V> = ...

Cache object

Accessors

  • get size(): number

Methods

  • [iterator](): IterableIterator<K>
  • entries(): IterableIterator<[K, V]>
  • has(key: K): boolean
  • keys(): IterableIterator<K>
  • set(key: K, value: V): V
  • values(): IterableIterator<V>