Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MapCache

Creates a cache object to store key/value pairs.

Hierarchy

  • MapCache

Index

Methods

Methods

delete

  • delete(key: string): boolean
  • Removes key and its value from the cache.

    Parameters

    • key: string

      The key of the value to remove.

    Returns boolean

    Returns true if the entry was removed successfully, else false.

get

  • get(key: string): any
  • Gets the cached value for key.

    Parameters

    • key: string

      The key of the value to get.

    Returns any

    Returns the cached value.

has

  • has(key: string): boolean
  • Checks if a cached value for key exists.

    Parameters

    • key: string

      The key of the entry to check.

    Returns boolean

    Returns true if an entry for key exists, else false.

set

  • Sets value to key of the cache.

    Parameters

    • key: string

      The key of the value to cache.

    • value: any

      The value to cache.

    Returns Dictionary<any>

    Returns the cache object.