Last active
September 29, 2017 09:29
-
-
Save MikeGoldsmith/52be8eec96a3115d73d5ff74618aba80 to your computer and use it in GitHub Desktop.
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
using System; | |
using System.Collections.Generic; | |
using Couchbase; | |
using Couchbase.Authentication; | |
using Couchbase.Configuration.Client; | |
namespace memcached_example | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var configuration = new ClientConfiguration | |
{ | |
Servers = new List<Uri> {new Uri("http://10.112.163.101:8091/pools")} | |
}; | |
using (var cluster = new Cluster(configuration)) | |
{ | |
cluster.Authenticate(new ClusterCredentials | |
{ | |
BucketCredentials = | |
{ | |
{"MOTK-User", "<password>"}, | |
{"MOTK-UserSession", "<password>"} | |
} | |
}); | |
var bucket = cluster.OpenBucket("MOTK-User"); | |
bucket.Upsert("my-key", new { }); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment