Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include a default redis client #203

Open
nfriedly opened this issue Feb 20, 2024 · 1 comment
Open

Include a default redis client #203

nfriedly opened this issue Feb 20, 2024 · 1 comment

Comments

@nfriedly
Copy link
Member

Description

I think we should include a default redis client, and accept a new option for the connection details that is passed directly to the redis client.

I think node-redis and ioredis are the two most popular ones. node-redis has more github stars while ioredis has more npm downloads. I'm leaning a bit towards ioredis since it has a smaller file size, although node-redis has the advantage of only accepting 0 or 1 arguments to it's constructor, whereas ioredis accepts 0-3. (We could accept an array for the 2+ arg versions.)

We should still keep the sendCommand option around for backwards compatibility and advanced usage. It should probably throw an error if both sendCommand and our new option are set at the same time.

Why

This should simplify usage.

Alternatives

Not changing anything

@gamemaker1
Copy link
Member

I'm on the fence for this one; don't really see a need to add this option. We can fix #202 by explaining the sendCommand function better in the documentation.

However, if we do implement this, I think we should go with ioredis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants