Toshihiko
    Preparing search index...

    Redis-backed Cache implementation using ioredis pipelines for batch reads and invalidation.

    Hierarchy (View Summary)

    Index
    • Creates a Redis Cache.

      Parameters

      • servers: string

        Redis address in host:port form.

      • Optionaloptions: RedisCacheOptions

        ioredis options and optional Cache-key prefix.

      • Optionalclient: Redis<"legacy">

        Existing ioredis client, mainly for integration and tests.

      Returns RedisCache

    prefix: string

    Prefix prepended to generated Redis keys.

    redis: Redis

    Underlying ioredis client.

    • Deletes one cached row.

      Parameters

      • database: string
      • table: string
      • key: CacheKey

      Returns Promise<number>

    • Deletes cached rows for multiple keys.

      Parameters

      • database: string
      • table: string
      • keys: readonly CacheKey[]

      Returns Promise<number[]>

    • Reads cached rows in request order, using null for a cache miss.

      Type Parameters

      • Value extends object

      Parameters

      Returns Promise<(Value | null)[]>

    • Stores one serialized row under a Cache key.

      Type Parameters

      • Value extends object

      Parameters

      Returns Promise<"OK" | null>