Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ObjectCache<T, P>

A cache for arbitrary objects that returns the same object for the same parameters

Type parameters

  • T

  • P

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • new ObjectCache(_generator: (params: P) => T): ObjectCache

Properties

Private _cache

_cache: {}

Type declaration

  • [key: string]: T

Private _generator

_generator: (params: P) => T

Type declaration

    • (params: P): T
    • Parameters

      • params: P

      Returns T

Methods

get

  • get(params: P): T

Generated using TypeDoc