Skip to content

redis-adapter can't be used with createCluster #1282

Description

@herebebogans

The redis-adapter package is not compatible with redis clustering mode

example:

import { useAdapter } from '@type-cacheable/redis-adapter';
import { createCluster } from 'redis';

const client = createCluster({ rootNodes: [{ url: `redis://my-cluster-endpoint:6379` }] });
const clientAdapter = useAdapter(client);

error when trying to use above

TypeError: this.redisClient.info is not a function
at RedisAdapter. (..../node_modules/@type-cacheable/redis-adapter/dist/index.js:100:55)

This make the module not usabled for production environments eg AWS Redis / valkey elasticache

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions