Skip to content

Instantly share code, notes, and snippets.

@superchris
Created June 15, 2010 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save superchris/439186 to your computer and use it in GitHub Desktop.
Save superchris/439186 to your computer and use it in GitHub Desktop.
>> Redis::VERSION
Redis::VERSION
=> "2.0.1"
>> r = Redis.new
r = Redis.new
=> #<Redis:0x8777470 @client=#<Redis::Client:0x877740c @host="127.0.0.1", @password=nil, @timeout=5, @sock=nil, @logger=nil, @db=0, @port=6379>>
>> redis.set "test1", "foo"
redis.set "test1", "foo"
>> r.set "test1", "foo"
r.set "test1", "foo"
=> "OK"
>> r.set "test2", "bar"
r.set "test2", "bar"
=> "OK"
>> r.mget ["test1", "test2"]
r.mget ["test1", "test2"]
=> [nil]
>> r.mget "test1", "test2"
r.mget "test1", "test2"
=> ["foo", "bar"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment