1 C/C++ Client Library for memcached
2 ==================================
7 #include <libmemcached/memcached.h>
8 Compile and link with -lmemcached
12 `libmemcached` is an open source C/C++ client library and tools for the
13 memcached server (http://memcached.org/). It has been designed to be light on
14 memory usage, thread safe, and provide full access to server side methods.
16 `libmemcached` was designed to provide the greatest number of options to use
17 Memcached. Some of the features provided:
19 1. Asynchronous and Synchronous Transport Support.
20 2. Consistent Hashing and Distribution.
21 3. Tunable Hashing algorithm to match keys.
22 4. Access to large object support.
24 6. A complete reference guide and documentation to the API.
25 7. Tools to Manage your Memcached networks.
30 "Memcached is a high-performance, distributed memory object caching system,
31 generic in nature, but intended for use in speeding up dynamic web applications
32 by alleviating database load." `http://memcached.org/ <http://memcached.org/>`_
34 `libmemcached` is a small, thread-safe client library for the memcached
35 protocol. The code has all been written to allow for both web and embedded
36 usage. It handles the work behind routing individual keys to specific servers
37 specified by the developer (and values are matched based on server order as
38 supplied by the user). It implements a modular and consistent method of object
41 There are multiple implemented routing and hashing methods. See the
42 `memcached_behavior_set` manpage for more information.
44 All operations are performed against a `memcached_st` structure. These
45 structures can either be dynamically allocated or statically allocated and then
46 initialized by `memcached_create`. Functions have been written in order to
47 encapsulate the `memcached_st`. It is not recommended that you operate directly
48 against the structure.
50 Nearly all functions return a `memcached_return_t` value. This value can be
51 translated to a printable string with `memcached_strerror`.
53 Objects are stored on servers by hashing keys. The hash value maps the key to a
54 particular server. All clients understand how this hashing works, so it is
55 possibly to reliably both push data to a server and retrieve data from a server.
57 Group keys can be optionally used to group sets of objects with servers.
59 Namespaces are supported, and can be used to partition caches so that multiple
60 applications can use the same memcached servers.
62 Some features of the library must be enabled through `memcached_behavior_set`.
67 No global variables are used in this library.
69 `memcached_st` structures are thread-safe, but when using threads or forked
70 processes it is important to keep one instance of `memcached_st` per process or
71 thread. Without creating your own locking structures you can not share a single
72 `memcached_st`. However, you can call `memcached_quit` on a `memcached_st` and
73 then use the resulting cloned structure.
78 `libmemcached` can be built to support Systemtap on Linux when enabled at
81 Please see :manpage:`stap(1)` and :manpage:`dtrace(1)` for more information
87 `libmemcached` comes with a few useful client programs:
91 :manpage:`memcached(1)`
92 :manpage:`memaslap(1)`
93 :manpage:`memcapable(1)`
97 :manpage:`memerror(1)`
98 :manpage:`memexist(1)`
99 :manpage:`memflush(1)`
100 :manpage:`memparse(1)`
101 :manpage:`memping(1)`
103 :manpage:`memslap(1)`
104 :manpage:`memstat(1)`
105 :manpage:`memtouch(1)`
109 * :doc:`bin/memaslap`
110 * :doc:`bin/memcapable`
114 * :doc:`bin/memerror`
115 * :doc:`bin/memexist`
116 * :doc:`bin/memflush`
117 * :doc:`bin/memparse`
122 * :doc:`bin/memtouch`
129 :manpage:`libhashkit(3)`
130 :manpage:`libmemcachedutil(3)`
135 * :doc:`libmemcachedutil`
142 :manpage:`memcached(1)`
144 :manpage:`libmemcached_configuration(3)`
145 :manpage:`libmemcached_examples(3)`
147 :manpage:`memcached_analyze(3)`
148 :manpage:`memcached_append(3)`
149 :manpage:`memcached_auto(3)`
150 :manpage:`memcached_behavior(3)`
151 :manpage:`memcached_callback(3)`
152 :manpage:`memcached_cas(3)`
153 :manpage:`memcached_create(3)`
154 :manpage:`memcached_delete(3)`
155 :manpage:`memcached_dump(3)`
156 :manpage:`memcached_exist(3)`
157 :manpage:`memcached_fetch(3)`
158 :manpage:`memcached_flush(3)`
159 :manpage:`memcached_flush_buffers(3)`
160 :manpage:`memcached_generate_hash_value(3)`
161 :manpage:`memcached_get(3)`
162 :manpage:`memcached_last_error_message(3)`
163 :manpage:`memcached_memory_allocators(3)`
164 :manpage:`memcached_pool(3)`
165 :manpage:`memcached_quit(3)`
166 :manpage:`memcached_result_st(3)`
167 :manpage:`memcached_return_t(3)`
168 :manpage:`memcached_sasl(3)`
169 :manpage:`memcached_servers(3)`
170 :manpage:`memcached_server_st(3)`
171 :manpage:`memcached_set(3)`
172 :manpage:`memcached_set_encoding_key(3)`
173 :manpage:`memcached_stats(3)`
174 :manpage:`memcached_strerror(3)`
175 :manpage:`memcached_touch(3)`
176 :manpage:`memcached_user_data(3)`
177 :manpage:`memcached_verbosity(3)`
178 :manpage:`memcached_version(3)`
182 * :manpage:`memcached(1)`
184 * :doc:`libmemcached/configuration`
185 * :doc:`libmemcached/examples`