Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CacheProvider

A cache provider.

Hierarchy

  • CacheProvider

Implemented by

Index

Methods

Methods

clear

  • clear(): this

get

  • get<TValue, TDefault>(key: any, defaultValue?: TDefault): TValue | TDefault
  • Returns a value from the cache.

    Type parameters

    • TValue

    • TDefault

    Parameters

    • key: any

      The key of the value.

    • Optional defaultValue: TDefault

    Returns TValue | TDefault

    The value.

has

  • has(key: any): boolean
  • Checks if the cache contains a value.

    Parameters

    • key: any

      The key of the value.

    Returns boolean

    Contains value or not.

set

  • set<TValue>(key: any, value: TValue): this
  • Sets a value for an object.

    chainable

    Type parameters

    • TValue

    Parameters

    • key: any

      The key of the value.

    • value: TValue

      The value to set.

    Returns this

    this

unset

  • unset(name: string): this
  • Sets a value for an object.

    chainable

    Parameters

    • name: string

      The name of the value.

    Returns this

    this

Generated using TypeDoc