Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T

Hierarchy

  • LruCache

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new LruCache(maxEntries?: number, evictCallback?: function): LruCache

Properties

Private evictCallback

evictCallback: function

Type declaration

    • (t: T): void
    • Parameters

      • t: T

      Returns void

Private gets

gets: number = 0

Private hits

hits: number = 0

Private maxEntries

maxEntries: number

Private values

values: Map<string, T> = new Map<string, T>()

Accessors

stats

  • get stats(): object

Methods

evict

  • evict(key: string): boolean

get

  • get(key: string): T

put

  • put(key: string, value: T): void

Generated using TypeDoc