Skip to content

Instantly share code, notes, and snippets.

@philipjkim
Created August 8, 2012 05:57
Show Gist options
  • Save philipjkim/3292568 to your computer and use it in GitHub Desktop.
Save philipjkim/3292568 to your computer and use it in GitHub Desktop.
Simple set/get test using Ruby Couchbase client
require 'couchbase'
c = Couchbase.connect(:hostname => 'hostname',
:port => 8091,
:pool => 'default',
:bucket => 'bucket',
:username => 'bucket',
:password => 'password')
c.run do |conn|
conn.set "foo", "bar", :ttl => 60
conn.get "foo" {|ret| puts ret.value}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment