Options
All
  • Public
  • Public/Protected
  • All
Menu

Module caches/renewable

Type aliases

KeyConfigProvider

KeyConfigProvider<Key, ArgumentsBundle>: function

Function which provides arguments bundle used by different cache operations (for the moment only Cache.set operation) for the specified key.

param

Key, args bundle of which is needed.

returns

Arguments bundle. If key doesn't require any arguments, undefined needs to be returned.

Type parameters

  • Key

  • ArgumentsBundle

Type declaration

    • (key: Key): ArgumentsBundle | undefined
    • Parameters

      • key: Key

      Returns ArgumentsBundle | undefined

KeyRetriever

KeyRetriever<Key, Value>: function

Asynchronous function which retrieves value of the key.

param

Key, value of which needs to be retrieved.

returns

Value of the key. Notice that null is a valid value.
If key doesn't have any value, undefined needs to be returned.

Type parameters

  • Key

  • Value

Type declaration

    • (key: Key): Promise<Value | undefined>
    • Parameters

      • key: Key

      Returns Promise<Value | undefined>