docs: add changelogs [ci skip]
[awesomized/libmemcached] / docs / source / libmemcached.rst
1 C/C++ Client Library for memcached
2 ==================================
3
4 SYNOPSIS
5 --------
6
7 #include <libmemcached/memcached.h>
8 Compile and link with -lmemcached
9
10 =======
11
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.
15
16 `libmemcached` was designed to provide the greatest number of options to use
17 Memcached. Some of the features provided:
18
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.
23 5. Local replication.
24 6. A complete reference guide and documentation to the API.
25 7. Tools to Manage your Memcached networks.
26
27 DESCRIPTION
28 -----------
29
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/>`_
33
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
39 distribution.
40
41 There are multiple implemented routing and hashing methods. See the
42 `memcached_behavior_set` manpage for more information.
43
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.
49
50 Nearly all functions return a `memcached_return_t` value. This value can be
51 translated to a printable string with `memcached_strerror`.
52
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.
56
57 Group keys can be optionally used to group sets of objects with servers.
58
59 Namespaces are supported, and can be used to partition caches so that multiple
60 applications can use the same memcached servers.
61
62 Some features of the library must be enabled through `memcached_behavior_set`.
63
64 THREADS AND PROCESSES
65 ---------------------
66
67 No global variables are used in this library.
68
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.
74
75 SYSTEMTAP
76 ---------
77
78 `libmemcached` can be built to support Systemtap on Linux when enabled at
79 compile time.
80
81 Please see :manpage:`stap(1)` and :manpage:`dtrace(1)` for more information
82 about Systemtap.
83
84 CLIENT PROGRAMS
85 ---------------
86
87 `libmemcached` comes with a few useful client programs:
88
89 .. only:: man
90
91 :manpage:`memaslap(1)`
92 :manpage:`memcapable(1)`
93 :manpage:`memcat(1)`
94 :manpage:`memcp(1)`
95 :manpage:`memdump(1)`
96 :manpage:`memerror(1)`
97 :manpage:`memexist(1)`
98 :manpage:`memflush(1)`
99 :manpage:`memparse(1)`
100 :manpage:`memping(1)`
101 :manpage:`memrm(1)`
102 :manpage:`memslap(1)`
103 :manpage:`memstat(1)`
104 :manpage:`memtouch(1)`
105
106 .. only:: html
107
108 * :doc:`bin/memaslap`
109 * :doc:`bin/memcapable`
110 * :doc:`bin/memcat`
111 * :doc:`bin/memcp`
112 * :doc:`bin/memdump`
113 * :doc:`bin/memerror`
114 * :doc:`bin/memexist`
115 * :doc:`bin/memflush`
116 * :doc:`bin/memparse`
117 * :doc:`bin/memping`
118 * :doc:`bin/memrm`
119 * :doc:`bin/memslap`
120 * :doc:`bin/memstat`
121 * :doc:`bin/memtouch`
122
123 UTILITY LIBRARIES
124 -----------------
125
126 .. only:: man
127
128 :manpage:`libhashkit(3)`
129 :manpage:`libmemcachedutil(3)`
130
131 .. only:: html
132
133 * :doc:`libhashkit/index`
134 * :doc:`libmemcachedutil/index`
135
136 SEE ALSO
137 --------
138
139 .. only:: man
140
141 :manpage:`memcached(1)`
142 :manpage:`libmemcached_configuration(3)`
143 :manpage:`libmemcached_examples(3)`
144
145 :manpage:`memcached_analyze(3)`
146 :manpage:`memcached_append(3)`
147 :manpage:`memcached_auto(3)`
148 :manpage:`memcached_behavior(3)`
149 :manpage:`memcached_callback(3)`
150 :manpage:`memcached_cas(3)`
151 :manpage:`memcached_create(3)`
152 :manpage:`memcached_delete(3)`
153 :manpage:`memcached_dump(3)`
154 :manpage:`memcached_exist(3)`
155 :manpage:`memcached_fetch(3)`
156 :manpage:`memcached_flush(3)`
157 :manpage:`memcached_flush_buffers(3)`
158 :manpage:`memcached_generate_hash_value(3)`
159 :manpage:`memcached_get(3)`
160 :manpage:`memcached_last_error_message(3)`
161 :manpage:`memcached_memory_allocators(3)`
162 :manpage:`memcached_pool(3)`
163 :manpage:`memcached_quit(3)`
164 :manpage:`memcached_result_st(3)`
165 :manpage:`memcached_return_t(3)`
166 :manpage:`memcached_sasl(3)`
167 :manpage:`memcached_servers(3)`
168 :manpage:`memcached_server_st(3)`
169 :manpage:`memcached_set(3)`
170 :manpage:`memcached_set_encoding_key(3)`
171 :manpage:`memcached_stats(3)`
172 :manpage:`memcached_strerror(3)`
173 :manpage:`memcached_touch(3)`
174 :manpage:`memcached_user_data(3)`
175 :manpage:`memcached_verbosity(3)`
176 :manpage:`memcached_version(3)`
177
178 .. only:: html
179
180 * :manpage:`memcached(1)`
181
182 * :doc:`libmemcached/configuration`
183 * :doc:`libmemcached/examples`
184