Guest User

Untitled

a guest
Nov 30th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. require 'couchbase'
  2.  
  3. c = Couchbase.connect(:hostname => 'hostname',
  4. :port => 8091,
  5. :pool => 'default',
  6. :bucket => 'bucket',
  7. :username => 'bucket',
  8. :password => 'password')
  9.  
  10. c.run do |conn|
  11. conn.set "foo", "bar", :ttl => 60
  12. conn.get "foo" {|ret| puts ret.value}
  13. end
Add Comment
Please, Sign In to add comment