Cache class

Constructors

Properties

Methods

Constructors

Properties

_table: CacheTable = {}

Methods

  • Get an item from the cache.

    Parameters

    • key: string

      The key of the item.

    Returns unknown

    The item, or null if it doesn't exist.

  • Load the cache from a JSON string.

    Parameters

    Returns void

  • Remove an item from the cache.

    Parameters

    • key: string

      The key of the item.

    Returns void

  • Set an item in the cache.

    Parameters

    • key: string

      The key of the item.

    • value: unknown

      The value of the item.

    • expires: number = 60000

      The time in milliseconds until the item expires.

    Returns void

Generated using TypeDoc