CacheRepository, cache repository management interface

Constructors

Methods

Constructors

  • Create an instance of CacheRepository

    Parameters

    • client: Redis

      Redis client instance

    Returns CacheRepository

Methods

  • Return the value of the previous response for the requested path if is present in the cache

    Parameters

    • path: string

      Route path cached

    • uuid: string

      Request identification, for trace propuse

    Returns Promise<null | CacheEntry>

  • Return the value of the previous response for the requested path if is present in the cache

    Parameters

    • path: string

      Route path cached

    • response: CacheEntry

      Response to store in the cache, must be a string

    • uuid: string

      Request identification, for trace propuse

    Returns Promise<void>