A cache implementation stored in memory.

Hierarchy

Constructors

Properties

The stored cache items.

Methods

  • Decrement a key in the cache by a given amount.

    Parameters

    • key: string
    • Optional amount: number

    Returns Promise<number>

  • Fetch a value from the cache by its key.

    Returns

    Promise<any|undefined>

    Parameters

    • key: string

    Returns Promise<undefined | string>

  • Check if the cache has the given key.

    Returns

    Promise

    Parameters

    • key: string

    Returns Promise<boolean>

  • Increment a key in the cache by a given amount.

    Parameters

    • key: string
    • Optional amount: number

    Returns Promise<number>

  • Store the given value in the cache by key.

    Parameters

    • key: string
    • item: string

    Returns Promise<void>