Options
All
  • Public
  • Public/Protected
  • All
Menu

Type Parameters

  • Key

  • Value

Hierarchy

  • Cache

Index

Constructors

Properties

Methods

Constructors

  • new Cache<Key, Value>(): Cache<Key, Value>

Properties

map: Map<Key, Value>

Methods

  • forget(key: Key): void
  • get(key: Key): undefined | Value
  • getOrEmplace(key: Key, defaultValueFactory: (() => Value)): Value
  • Parameters

    • key: Key
    • defaultValueFactory: (() => Value)
        • (): Value
        • Returns Value

    Returns Value

  • has(key: Key): boolean
  • put(key: Key, value: Value): void