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

keyPrefix vs prefix #359

Closed
aleemb opened this issue Aug 15, 2016 · 2 comments
Closed

keyPrefix vs prefix #359

aleemb opened this issue Aug 15, 2016 · 2 comments

Comments

@aleemb
Copy link

aleemb commented Aug 15, 2016

I just switched to this lib and was reading that there are plans to merge this with node_redis. In either case, I found that I had to rename prefix to keyPrefix. Either this could be mentioned in the migration docs or better still, renaming the key to prefix would make the migration a bit more seamless.

@luin
Copy link
Collaborator

luin commented Aug 15, 2016

Hi @aleemb. keyPrefix is first supported by ioredis, and at that time, node_redis didn't have this feature, so the migration guides didn't include it. I just revisited the guides and found out it mentioned "The options passed to the constructor are different".

As for me, keyPrefix is better since the prefix only applies on the keys rather than patterns and channels.

@aleemb
Copy link
Author

aleemb commented Aug 15, 2016

As for me, keyPrefix is better since the prefix only applies on the keys rather than patterns and channels.

I wasn't aware of this distinction, makes sense. Thanks for highlighting it.

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

No branches or pull requests

2 participants