A simple caching mechanism for promises that:

  • Caches the result of a promise for a specified duration.
  • Prevents redundant calls by returning the cached promise when available.

Type Parameters

  • T

Constructors

Methods

Constructors

  • Type Parameters

    • T

    Parameters

    • OptionalmaxAge: null | number

    Returns PromiseCache<T>

Methods

  • Returns void