Skip to content

Instantly share code, notes, and snippets.

@scalp42
Forked from yankov/gist:2485964
Created April 5, 2014 20:13
Show Gist options
  • Select an option

  • Save scalp42/9997526 to your computer and use it in GitHub Desktop.

Select an option

Save scalp42/9997526 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'redis'
require 'redis/distributed'
r = Redis::Distributed.new %w[redis://host1:6379 redis://host2:6379]
# show node for key "foo"
p r.node_for("foo")
# set the value of "foo"
r.set("foo", "value")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment