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

Add ability to use ShardedJedis for sharded caching with Redis #66

Closed
wants to merge 1 commit into from

Conversation

jareddellitt
Copy link

This adds the ability to use consistent hashing when caching to multiple instances of Redis by using ShardedJedis.

@cb372
Copy link
Owner

cb372 commented Oct 26, 2015

Sorry about the slow reply, I just got back from holiday.

Thanks for the PR! I glanced through the code and it looks fine. I'll give it a proper review asap.

import scala.collection.JavaConversions.seqAsJavaList

val pool = new ShardedJedisPool(new JedisPoolConfig(), hosts.map {
case (host, port) ⇒ new JedisShardInfo(host, port)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No Unicode chars in the code please

@cb372
Copy link
Owner

cb372 commented Oct 27, 2015

Sorry, on closer inspection I've decided not to accept this PR in its current state because it duplicates a lot of code. But it's a useful feature and I'd like to accept it if you can refactor it a bit.

Please let me know if any of my comments don't make sense, or if you need any help with refactoring.

@cb372
Copy link
Owner

cb372 commented Dec 10, 2015

Thank you for the PR, but I ended up implementing this myself because I wanted to do some refactoring around Redis anyway. I've credited you in the changelog.

@cb372 cb372 closed this Dec 10, 2015
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

Successfully merging this pull request may close these issues.

None yet

2 participants