Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Cache

Hierarchy

  • Cache

Implemented by

Index

Methods

clear

  • clear(): void

get

  • get<T>(key: string, fallback: () => Promise<T>): Promise<T>
  • Cache#get

    since

    1.0.0

    Type parameters

    • T

    Parameters

    • key: string

      the key used to store/find the data in your cache. Case sensitive.

    • fallback: () => Promise<T>

      The fallback for if the request object was not found.

        • (): Promise<T>
        • Returns Promise<T>

    Returns Promise<T>

    Stored Cache.

set

  • Cache#set

    since

    1.0.0

    Parameters

    • key: string

      the key used to store/find the data in your cache. Case sensitive.

    • data: any

      The data you wish to store in the cache. This can be any data type.

    • Optional overwrites: CacheOverwrites

    Returns void

    Stored Cache.