Created
August 8, 2012 05:57
-
-
Save philipjkim/3292568 to your computer and use it in GitHub Desktop.
Simple set/get test using Ruby Couchbase client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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