Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- r = Redis.new(options)
- # classic:
- r.set('foo', 'bar')
- r.get('foo')
- r.sadd('baz', 1)
- # etc.
- # this could be cool:
- k1 = r.key('foo')
- k1.set('bar')
- k1.get
- k2 = r.key('baz')
- k2.sadd(1)
- # or even typed:
- k1 = r.key('foo') # defaults to string
- # ... as before
- k2 = r.key('baz', 'set')
- k2.add(1) # since it's a set, sadd could just become add
Add Comment
Please, Sign In to add comment