Class MemoryCacheAdapter<TType>

The MemoryCacheAdapter is used for easily fakingICache for testing.

IMPORT_PATH: "@daiso-tech/core/cache/memory-cache-adapter"

Type Parameters

  • TType = unknown

Implements

Constructors

Methods

  • Increments a numeric cache entry by a given amount. Useful for counters, rates, and statistics.

    Parameters

    • _context: IReadableContext
    • key: string

      Cache key to increment

    • value: number

      Amount to increment by.

    Returns Promise<boolean>

    true if the entry was incremented, false if the key did not exist

    If the cached value is not a number