-
Notifications
You must be signed in to change notification settings - Fork 93
Getting Started with using Memcached
opuneet edited this page May 27, 2014
·
2 revisions
Dyno uses the spy memcached client underneath when talking to a dynomite-memcached setup.
Here is how you can init the dyno client
- First get the dyno client
dependencies {
compile "com.netflix.dyno:dyno-memcache:{LATEST VERSION}"
}
- Build and init the client
DynoMCacheClient dynoClient = DynoMCacheClient.Builder.withName({YOUR APP NAME})
.withDynomiteClusterName({DYNOMITE CLUSTER NAME})
.build())
String value = client.<String>get("foo");
// Set with indefinite expiration
client.<String>set("foo", "bar");
// Set with expiration in 1 hr
client.<String>set("foo", "bar", 3600);
// Set with indefinite expiration
client.<String>set("foo", "bar");
// Set with expiration in 1 hr
client.delete("foo");
A Netflix Original Production
Tech Blog | Twitter @NetflixOSS | Jobs