Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • CacheProvider

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

cacheKeys

cacheKeys: Record<string, CacheItem>

options

Methods

get

  • get(key: string, callback: (err: Error | null, value: any) => void): void
  • Returns the value of the specified key in the cache

    Parameters

    • key: string
    • callback: (err: Error | null, value: any) => void
        • (err: Error | null, value: any): void
        • Parameters

          • err: Error | null
          • value: any

          Returns void

    Returns void

remove

  • remove(key: string, callback: (err: Error | null, key: string | null) => void): void
  • Removes an item from the cache if it exists

    Parameters

    • key: string
    • callback: (err: Error | null, key: string | null) => void
        • (err: Error | null, key: string | null): void
        • Parameters

          • err: Error | null
          • key: string | null

          Returns void

    Returns void

save

  • save(key: string, value: any, callback: (err: Error | null, item: CacheItem | null) => void): void
  • Store an item in the cache, using the specified key and value. Internally will keep track of the time the item was added to the cache

    Parameters

    • key: string
    • value: any
    • callback: (err: Error | null, item: CacheItem | null) => void
        • (err: Error | null, item: CacheItem | null): void
        • Parameters

          Returns void

    Returns void

Generated using TypeDoc