Skip to content

apollo-server-cache-redis: Add redis connection uri interface to RedisCache #5006

@airtoxin

Description

@airtoxin

RedisCache currently only accept RedisOptions interface of ioredis, but Redis constructor of ioredis can accept more variadic arguments.
https://github.com/luin/ioredis#connect-to-redis

new (port?: number, host?: string, options?: IORedis.RedisOptions): IORedis.Redis;
new (host?: string, options?: IORedis.RedisOptions): IORedis.Redis;
new (options?: IORedis.RedisOptions): IORedis.Redis;

In my use case, my application already connect to redis via connection uri redis://..., and RedisCache also want to connect its redis, but RedisCache can't accept connection uri.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions