WebCola
Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc