Skip to content

RedisStore error returns not valid RedisClient #2436

@Alexis90

Description

@Alexis90

Description

const redis = require("redis");
const { setup, RedisStore } = require("axios-cache-adapter");
const client = redis.createClient({
    url: 'REDIS_URL'
})
const store = new RedisStore(client) // => TypeError: First parameter must be a valid RedisClient instance.
    at new RedisStore (D:\dev\axios-cache\node_modules\axios-cache-adapter\dist\cache.node.js:5432:30)

So I trace back to redis.createClient function, when I do client.isReady => false, while client.isOpen => true

However I tried client.set(key,value), it successfully wrote into my Redis database.

My question is to understand why RedisStore function from axios-cache-adapter doesn't take my redis client and why when I check client.isReady it shows false.

Node.js Version

18

Redis Server Version

No response

Node Redis Version

4

Platform

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions