Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

Hierarchy

  • default

Index

Constructors

Properties

cache: T

Original cache object

engine: PersistentEngine<unknown>

Engine to save cache items within a storage

fetchedItems: Set<string> = ...

Object that stores keys of all properties that have already been fetched from the storage

ttl?: number

Default TTL to store items

wrappedCache: PersistentCache<V, string, CacheWithEmitter<V, string, default<V, string>>>

Wrapped cache object

Methods

  • checkItemInStorage(key: string): Promise<void>
  • getDefaultImplementation(method: "has"): (key: string) => Promise<boolean>
  • getDefaultImplementation(method: "get"): (key: string) => Promise<CanUndef<V>>
  • Returns the default implementation for the specified cache method with adding a feature of persistent storing

    Parameters

    • method: "has"

    Returns (key: string) => Promise<boolean>

      • (key: string): Promise<boolean>
      • Returns the default implementation for the specified cache method with adding a feature of persistent storing

        Parameters

        • key: string

        Returns Promise<boolean>

  • Parameters

    • method: "get"

    Returns (key: string) => Promise<CanUndef<V>>

      • Parameters

        • key: string

        Returns Promise<CanUndef<V>>

  • implementAPI(): void