Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CacheStack

A stack of caches.

When retrieving values, we look for them in each cache in the stack. If a cache misses, the next Cache or CacheSource is checked. Once a value is found, we fill all caches earlier in the stack.

Used to create multi-layered caches.

see

MegaCache for our recommended cache stack.

Hierarchy

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

cacheType

cacheType: "async" = "async"

stack

Accessors

count

  • get count(): number
  • Returns number

dataSize

  • get dataSize(): number
  • Returns number

Methods

close

  • close(): Promise<void>

delete

  • delete(key: string | Buffer): Promise<void>
  • Parameters

    • key: string | Buffer

    Returns Promise<void>

get

  • get(key: string): Promise<Buffer | undefined>
  • Parameters

    • key: string

    Returns Promise<Buffer | undefined>

set

  • set(key: string, value: Buffer): Promise<void>
  • Parameters

    • key: string
    • value: Buffer

    Returns Promise<void>

Generated using TypeDoc