Options
All
  • Public
  • Public/Protected
  • All
Menu

A cache provider, which stores values in memory.

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Protected _storage

_storage: {}

The storage object with values.

Type declaration

  • [key: string]: any

Methods

clear

get

  • get<TValue, TDefault>(key: any, defaultValue?: TDefault): TValue | TDefault
  • inheritdoc

    Type parameters

    • TValue = any

    • TDefault = TValue

    Parameters

    • key: any
    • Optional defaultValue: TDefault

    Returns TValue | TDefault

has

  • has(key: any): boolean
  • inheritdoc

    Parameters

    • key: any

    Returns boolean

Protected normalizeKey

  • normalizeKey(key: any): string
  • Normalizes a key value.

    Parameters

    • key: any

      The input value.

    Returns string

    The normalized value.

set

  • inheritdoc

    Type parameters

    • TValue

    Parameters

    • key: any
    • value: TValue

    Returns MemoryCache

unset

Generated using TypeDoc