Type Parameters

  • TFields extends Record<string, any>

Implements

Constructors

Methods

  • Negatively-cache specified keys. Subsequent loads for these keys (without calling invalidate) may return a negative CacheLoadResult

    Parameters

    • keys: readonly string[]

      keys to cache negatively

    Returns Promise<void>

  • Invalidate specified keys in cache. Subsequent loads for these keys may return a cache miss.

    Parameters

    • keys: readonly string[]

      keys to invalidate

    Returns Promise<void>

  • Load many keys from the cache. Return info in a format that is useful for read-through caching and negative caching.

    Parameters

    • keys: readonly string[]

      cache keys to load

    Returns Promise<ReadonlyMap<string, CacheLoadResult<TFields>>>

  • Create a cache key for a field and value of a object being cached or invalidated.

    Type Parameters

    • N extends string | number | symbol

    Parameters

    • fieldName: N

      name of the object field for this cache key

    • fieldValue: NonNullable<TFields[N]>

      value of the obejct field for this cache key

    Returns string