Created
September 19, 2009 19:59
-
-
Save posulliv/189562 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
/* various ways to construct a memcached client */ | |
memcache::Memcache first_client("server:11211"); | |
memcache::Memcache second_client("server1:11211 server2:11211"); | |
memcache::Memcache third_client("server", port_num); | |
/* basic operations */ | |
first_client.set("key", some_vector_of_chars, time_to_live, flags); | |
first_client.get("key", some_vector_to_fill_with_data); | |
first_client.remove("key"); | |
/* add a memcached server */ | |
third_client.addServer("server", port_num); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment