Function createMemoryCacheProvider

  • Returns a cache provider that stores key-value pairs in a map with an optional expiration time.

    Type Parameters

    • T

      The type of the value to be stored in the cache.

    • K extends any[]

      The type of the key used to retrieve the value from the cache.

    Parameters

    • __namedParameters: {
          cacheTime: number;
          hash: ((k) => string);
      }
      • cacheTime: number
      • hash: ((k) => string)
          • (k): string
          • Parameters

            • k: K

            Returns string

    Returns CacheProvider<T, K>

    Returns an object with methods for getting, setting, deleting, clearing, and managing the cache expiration.

Generated using TypeDoc