4 <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
5 <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
9 <meta name=
"viewport" content=
"width=device-width, initial-scale=1.0">
11 <title>libmemcached Configuration
— libmemcached
1.1.0 documentation
</title>
20 <script type=
"text/javascript" src=
"../_static/js/modernizr.min.js"></script>
23 <script type=
"text/javascript" id=
"documentation_options" data-url_root=
"../" src=
"../_static/documentation_options.js"></script>
24 <script type=
"text/javascript" src=
"../_static/jquery.js"></script>
25 <script type=
"text/javascript" src=
"../_static/underscore.js"></script>
26 <script type=
"text/javascript" src=
"../_static/doctools.js"></script>
27 <script type=
"text/javascript" src=
"../_static/language_data.js"></script>
29 <script type=
"text/javascript" src=
"../_static/js/theme.js"></script>
34 <link rel=
"stylesheet" href=
"../_static/css/theme.css" type=
"text/css" />
35 <link rel=
"stylesheet" href=
"../_static/pygments.css" type=
"text/css" />
36 <link rel=
"index" title=
"Index" href=
"../genindex.html" />
37 <link rel=
"search" title=
"Search" href=
"../search.html" />
38 <link rel=
"copyright" title=
"Copyright" href=
"../copyright.html" />
39 <link rel=
"next" title=
"libmemcached Constants and Defaults" href=
"constants.html" />
40 <link rel=
"prev" title=
"Miscellaneous" href=
"index_misc.html" />
43 <body class=
"wy-body-for-nav">
46 <div class=
"wy-grid-for-nav">
48 <nav data-toggle=
"wy-nav-shift" class=
"wy-nav-side">
49 <div class=
"wy-side-scroll">
50 <div class=
"wy-side-nav-search" >
54 <a href=
"../index.html" class=
"icon icon-home"> libmemcached
71 <form id=
"rtd-search-form" class=
"wy-form" action=
"../search.html" method=
"get">
72 <input type=
"text" name=
"q" placeholder=
"Search docs" />
73 <input type=
"hidden" name=
"check_keywords" value=
"yes" />
74 <input type=
"hidden" name=
"area" value=
"default" />
81 <div class=
"wy-menu wy-menu-vertical" data-spy=
"affix" role=
"navigation" aria-label=
"main navigation">
89 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../libmemcached.html">Introduction
</a></li>
90 <li class=
"toctree-l1"><a class=
"reference internal" href=
"index.html">libmemcached API
</a></li>
91 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../libmemcachedutil/index.html">libmemcachedutil API
</a></li>
92 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../libhashkit/index.html">libhashkit API
</a></li>
93 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../bin/index.html">Client Applications
</a></li>
94 <li class=
"toctree-l1 current"><a class=
"reference internal" href=
"index_misc.html">Miscellaneous
</a><ul class=
"current">
95 <li class=
"toctree-l2 current"><a class=
"current reference internal" href=
"#">Configuration
</a></li>
96 <li class=
"toctree-l2"><a class=
"reference internal" href=
"constants.html">Constants
</a></li>
97 <li class=
"toctree-l2"><a class=
"reference internal" href=
"examples.html">Examples
</a></li>
98 <li class=
"toctree-l2"><a class=
"reference internal" href=
"versioning.html">Versioning
</a></li>
103 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../changelogs.html">Change Logs
</a></li>
104 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../copyright.html">Copyright
</a></li>
113 <section data-toggle=
"wy-nav-shift" class=
"wy-nav-content-wrap">
116 <nav class=
"wy-nav-top" aria-label=
"top navigation">
118 <i data-toggle=
"wy-nav-top" class=
"fa fa-bars"></i>
119 <a href=
"../index.html">libmemcached
</a>
124 <div class=
"wy-nav-content">
126 <div class=
"rst-content">
144 <div role=
"navigation" aria-label=
"breadcrumbs navigation">
146 <ul class=
"wy-breadcrumbs">
148 <li><a href=
"../index.html">Docs
</a> »</li>
150 <li><a href=
"index_misc.html">Miscellaneous
</a> »</li>
152 <li>libmemcached Configuration
</li>
155 <li class=
"wy-breadcrumbs-aside">
159 <a href=
"https://github.com/m6w6/libmemcached/blob/v1.x/docs/source/libmemcached/configuration.rst" class=
"fa fa-github"> Edit on GitHub
</a>
170 <div role=
"main" class=
"document" itemscope=
"itemscope" itemtype=
"http://schema.org/Article">
171 <div itemprop=
"articleBody">
173 <div class=
"section" id=
"libmemcached-configuration">
174 <h1>libmemcached Configuration
<a class=
"headerlink" href=
"#libmemcached-configuration" title=
"Permalink to this headline">¶
</a></h1>
175 <div class=
"section" id=
"synopsis">
176 <h2>SYNOPSIS
<a class=
"headerlink" href=
"#synopsis" title=
"Permalink to this headline">¶
</a></h2>
177 <dl class=
"docutils">
178 <dt>#include
<libmemcached-
<a href=
"#id1"><span class=
"problematic" id=
"id2">|libmemcached_version|
</span></a>/memcached.h
></dt>
179 <dd>Compile and link with -lmemcached
</dd>
181 <dl class=
"function">
182 <dt id=
"_CPPv49memcachedPKc6size_t">
183 <span id=
"_CPPv39memcachedPKc6size_t"></span><span id=
"_CPPv29memcachedPKc6size_t"></span><span id=
"memcached__cCP.s"></span><a class=
"reference internal" href=
"memcached_create.html#_CPPv412memcached_st" title=
"memcached_st">memcached_st
</a> *
<code class=
"descname">memcached
</code><span class=
"sig-paren">(
</span><em class=
"property">const
</em> char *
<em>string
</em>, size_t
<em>string_length
</em><span class=
"sig-paren">)
</span><a class=
"headerlink" href=
"#_CPPv49memcachedPKc6size_t" title=
"Permalink to this definition">¶
</a><br /></dt>
184 <dd><table class=
"docutils field-list" frame=
"void" rules=
"none">
185 <col class=
"field-name" />
186 <col class=
"field-body" />
188 <tr class=
"field-odd field"><th class=
"field-name">Parameters:
</th><td class=
"field-body"><ul class=
"first simple">
189 <li><strong>string
</strong> -- configuration string
</li>
190 <li><strong>string_length
</strong> -- length of the configuration string without any terminating zero
</li>
194 <tr class=
"field-even field"><th class=
"field-name">Returns:
</th><td class=
"field-body"><p class=
"first last">allocated and initialized
<a class=
"reference internal" href=
"memcached_create.html#_CPPv412memcached_st" title=
"memcached_st"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_st
</span></code></a> struct
</p>
201 <dl class=
"function">
202 <dt id=
"_CPPv432libmemcached_check_configurationPKc6size_tPc6size_t">
203 <span id=
"_CPPv332libmemcached_check_configurationPKc6size_tPc6size_t"></span><span id=
"_CPPv232libmemcached_check_configurationPKc6size_tPc6size_t"></span><span id=
"libmemcached_check_configuration__cCP.s.cP.s"></span><a class=
"reference internal" href=
"memcached_return_t.html#_CPPv418memcached_return_t" title=
"memcached_return_t">memcached_return_t
</a> <code class=
"descname">libmemcached_check_configuration
</code><span class=
"sig-paren">(
</span><em class=
"property">const
</em> char *
<em>option_string
</em>, size_t
<em>length
</em>, char *
<em>error_buffer
</em>, size_t
<em>error_buffer_size
</em><span class=
"sig-paren">)
</span><a class=
"headerlink" href=
"#_CPPv432libmemcached_check_configurationPKc6size_tPc6size_t" title=
"Permalink to this definition">¶
</a><br /></dt>
204 <dd><table class=
"docutils field-list" frame=
"void" rules=
"none">
205 <col class=
"field-name" />
206 <col class=
"field-body" />
208 <tr class=
"field-odd field"><th class=
"field-name">Parameters:
</th><td class=
"field-body"><ul class=
"first simple">
209 <li><strong>option_string
</strong> -- configuration string
</li>
210 <li><strong>length
</strong> -- length of the configuration string without any terminating zero
</li>
211 <li><strong>error_buffer
</strong> -- buffer used to store any error message
</li>
212 <li><strong>error_buffer_size
</strong> -- available size of the
<a class=
"reference internal" href=
"#_CPPv432libmemcached_check_configurationPKc6size_tPc6size_t" title=
"libmemcached_check_configuration::error_buffer"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">error_buffer
</span></code></a></li>
216 <tr class=
"field-even field"><th class=
"field-name">Returns:
</th><td class=
"field-body"><p class=
"first last"><a class=
"reference internal" href=
"memcached_return_t.html#_CPPv418memcached_return_t" title=
"memcached_return_t"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_return_t
</span></code></a> indicating success
</p>
224 <div class=
"section" id=
"description">
225 <h2>DESCRIPTION
<a class=
"headerlink" href=
"#description" title=
"Permalink to this headline">¶
</a></h2>
226 <p><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">libmemcached
</span></code> implements a custom language for configuring and modifying
227 servers. By passing in an option string you can generate a
<a class=
"reference internal" href=
"memcached_create.html#_CPPv412memcached_st" title=
"memcached_st"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_st
</span></code></a> object
228 that you can use in your application directly.
</p>
229 <div class=
"section" id=
"general-options">
230 <h3>General Options:
<a class=
"headerlink" href=
"#general-options" title=
"Permalink to this headline">¶
</a></h3>
231 <dl class=
"describe">
233 <code class=
"descname">--SERVER=
<servername
>:
<optional_port
>/?
<optional_weight
></code></dt>
234 <dd><p>Provide a servername to be used by the client.
</p>
235 <p>Providing a weight will cause weighting to occur with all hosts with each
236 server getting a default weight of
1.
</p>
239 <dl class=
"describe">
241 <code class=
"descname">--SOCKET=
"<filepath
>/?
<optional_weight
>"</code></dt>
242 <dd><p>Provide a filepath to a UNIX socket file. Providing a weight will cause
243 weighting to occur with all hosts with each server getting a default weight
247 <dl class=
"describe">
249 <code class=
"descname">--VERIFY-KEY
</code></dt>
250 <dd><p>Verify that keys that are being used fit within the design of the protocol
254 <dl class=
"describe">
256 <code class=
"descname">--REMOVE_FAILED_SERVERS
</code></dt>
257 <dd><p>Enable the behavior
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv4N20memcached_behavior_t40MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERSE" title=
"MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS
</span></code></a>.
</p>
260 <dl class=
"describe">
262 <code class=
"descname">--BINARY-PROTOCOL
</code></dt>
263 <dd><p>Force all connections to use the binary protocol.
</p>
266 <dl class=
"describe">
268 <code class=
"descname">--BUFFER-REQUESTS
</code></dt>
269 <dd><p>Please see
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv4N20memcached_behavior_t34MEMCACHED_BEHAVIOR_BUFFER_REQUESTSE" title=
"MEMCACHED_BEHAVIOR_BUFFER_REQUESTS"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
</span></code></a>.
</p>
272 <dl class=
"describe">
274 <code class=
"descname">--CONFIGURE-FILE=
</code></dt>
275 <dd><p>Provide a configuration file to be used to load requests. Beware that by
276 using a configuration file
<code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">libmemcached
</span></code> will reset
<a class=
"reference internal" href=
"memcached_create.html#_CPPv412memcached_st" title=
"memcached_st"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_st
</span></code></a> based
277 on information only contained in the file.
</p>
280 <dl class=
"describe">
282 <code class=
"descname">--CONNECT-TIMEOUT=
</code></dt>
283 <dd><p>See
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title=
"memcached_behavior_set"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_behavior_set()
</span></code></a> for
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv4N20memcached_behavior_t34MEMCACHED_BEHAVIOR_CONNECT_TIMEOUTE" title=
"MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
</span></code></a>.
</p>
286 <dl class=
"describe">
288 <code class=
"descname">--DISTRIBUTION=
</code></dt>
289 <dd><p>Set the distribution model used by the client.
290 See
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title=
"memcached_behavior_set"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_behavior_set()
</span></code></a> for more details.
</p>
293 <dl class=
"describe">
295 <code class=
"descname">--HASH=
</code></dt>
296 <dd><p>Set the hashing algorithm used for placing keys on servers.
</p>
299 <dl class=
"describe">
301 <code class=
"descname">--HASH-WITH-NAMESPACE
</code></dt>
302 <dd><p>When enabled the prefix key will be added to the key when determining which
303 server to store the data in.
</p>
306 <dl class=
"describe">
308 <code class=
"descname">--NOREPLY
</code></dt>
309 <dd><p>Enable
"no reply
" for all calls that support this. It is highly recommended
310 that you use this option with the binary protocol only.
</p>
313 <dl class=
"describe">
315 <code class=
"descname">--NUMBER-OF-REPLICAS=
</code></dt>
316 <dd><p>Set the number of servers that keys will be replicated to.
</p>
319 <dl class=
"describe">
321 <code class=
"descname">--RANDOMIZE-REPLICA-READ
</code></dt>
322 <dd><p>Select randomly the server within the replication pool to read from.
</p>
325 <dl class=
"describe">
327 <code class=
"descname">--SORT-HOSTS
</code></dt>
328 <dd><p>When adding new servers always calculate their distribution based on sorted
332 <dl class=
"describe">
334 <code class=
"descname">--SUPPORT-CAS
</code></dt>
335 <dd><p>See
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title=
"memcached_behavior_set"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_behavior_set()
</span></code></a> for
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv4N20memcached_behavior_t30MEMCACHED_BEHAVIOR_SUPPORT_CASE" title=
"MEMCACHED_BEHAVIOR_SUPPORT_CAS"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">MEMCACHED_BEHAVIOR_SUPPORT_CAS
</span></code></a></p>
338 <dl class=
"describe">
340 <code class=
"descname">--USE-UDP
</code></dt>
341 <dd><p>See
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title=
"memcached_behavior_set"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_behavior_set()
</span></code></a> for
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv4N20memcached_behavior_t26MEMCACHED_BEHAVIOR_USE_UDPE" title=
"MEMCACHED_BEHAVIOR_USE_UDP"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">MEMCACHED_BEHAVIOR_USE_UDP
</span></code></a></p>
344 <dl class=
"describe">
346 <code class=
"descname">--NAMESPACE=
</code></dt>
347 <dd><p>A namespace is a container that provides context for keys, only other
348 requests that know the namespace can access these values. This is
349 accomplished by prepending the namespace value to all keys.
</p>
353 <div class=
"section" id=
"memcached-pool-options">
354 <h3>Memcached Pool Options:
<a class=
"headerlink" href=
"#memcached-pool-options" title=
"Permalink to this headline">¶
</a></h3>
355 <dl class=
"describe">
357 <code class=
"descname">--POOL-MIN
</code></dt>
358 <dd><p>Initial size of pool.
</p>
361 <dl class=
"describe">
363 <code class=
"descname">--POOL-MAX
</code></dt>
364 <dd><p>Maximize size of the pool.
</p>
368 <div class=
"section" id=
"i-o-options">
369 <h3>I/O Options:
<a class=
"headerlink" href=
"#i-o-options" title=
"Permalink to this headline">¶
</a></h3>
370 <dl class=
"describe">
372 <code class=
"descname">--TCP-NODELAY
</code></dt>
373 <dd><p>See
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title=
"memcached_behavior_set"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_behavior_set()
</span></code></a> for
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv4N20memcached_behavior_t30MEMCACHED_BEHAVIOR_TCP_NODELAYE" title=
"MEMCACHED_BEHAVIOR_TCP_NODELAY"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">MEMCACHED_BEHAVIOR_TCP_NODELAY
</span></code></a></p>
376 <dl class=
"describe">
378 <code class=
"descname">--TCP-KEEPALIVE
</code></dt>
379 <dd><p>See
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title=
"memcached_behavior_set"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_behavior_set()
</span></code></a> for
<code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">MEMCACHED_BEHAVIOR_TCP_KEEPALIVE
</span></code></p>
382 <dl class=
"describe">
384 <code class=
"descname">--RETRY-TIMEOUT=
</code></dt>
385 <dd><p>See
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title=
"memcached_behavior_set"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_behavior_set()
</span></code></a> for
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv4N20memcached_behavior_t32MEMCACHED_BEHAVIOR_RETRY_TIMEOUTE" title=
"MEMCACHED_BEHAVIOR_RETRY_TIMEOUT"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
</span></code></a></p>
388 <dl class=
"describe">
390 <code class=
"descname">--SERVER-FAILURE-LIMIT=
</code></dt>
391 <dd><p>See
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title=
"memcached_behavior_set"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_behavior_set()
</span></code></a> for
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv4N20memcached_behavior_t39MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMITE" title=
"MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
</span></code></a></p>
394 <dl class=
"describe">
396 <code class=
"descname">--SND-TIMEOUT=
</code></dt>
397 <dd><p>See
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title=
"memcached_behavior_set"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_behavior_set()
</span></code></a> for
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv4N20memcached_behavior_t30MEMCACHED_BEHAVIOR_SND_TIMEOUTE" title=
"MEMCACHED_BEHAVIOR_SND_TIMEOUT"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">MEMCACHED_BEHAVIOR_SND_TIMEOUT
</span></code></a></p>
400 <dl class=
"describe">
402 <code class=
"descname">--SOCKET-RECV-SIZE=
</code></dt>
403 <dd><p>See
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title=
"memcached_behavior_set"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_behavior_set()
</span></code></a> for
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv4N20memcached_behavior_t35MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZEE" title=
"MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
</span></code></a></p>
406 <dl class=
"describe">
408 <code class=
"descname">--SOCKET-SEND-SIZE=
</code></dt>
409 <dd><p>See
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title=
"memcached_behavior_set"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_behavior_set()
</span></code></a> for
<a class=
"reference internal" href=
"memcached_behavior.html#_CPPv4N20memcached_behavior_t35MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZEE" title=
"MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
</span></code></a></p>
412 <dl class=
"describe">
414 <code class=
"descname">--POLL-TIMEOUT=
</code></dt>
415 <dd><p>Set the timeout used by
<em class=
"manpage"><a class=
"manpage reference external" href=
"https://linux.die.net/man/3/poll">poll(
3)
</a></em>.
</p>
418 <dl class=
"describe">
420 <code class=
"descname">--IO-BYTES-WATERMARK=
</code></dt>
423 <dl class=
"describe">
425 <code class=
"descname">--IO-KEY-PREFETCH=
</code></dt>
428 <dl class=
"describe">
430 <code class=
"descname">--IO-MSG-WATERMARK=
</code></dt>
433 <dl class=
"describe">
435 <code class=
"descname">--TCP-KEEPIDLE
</code></dt>
438 <dl class=
"describe">
440 <code class=
"descname">--RCV-TIMEOUT=
</code></dt>
444 <div class=
"section" id=
"other-options">
445 <h3>Other Options:
<a class=
"headerlink" href=
"#other-options" title=
"Permalink to this headline">¶
</a></h3>
446 <dl class=
"describe">
448 <code class=
"descname">INCLUDE
</code></dt>
449 <dd><p>Include a file in configuration.
450 Unlike
<code class=
"docutils literal notranslate"><span class=
"pre">--CONFIGURE-FILE=
</span></code> this will not reset
<a class=
"reference internal" href=
"memcached_create.html#_CPPv412memcached_st" title=
"memcached_st"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_st
</span></code></a>.
</p>
453 <dl class=
"describe">
455 <code class=
"descname">RESET
</code></dt>
456 <dd><p>Reset
<a class=
"reference internal" href=
"memcached_create.html#_CPPv412memcached_st" title=
"memcached_st"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_st
</span></code></a> and continue to process.
</p>
459 <dl class=
"describe">
461 <code class=
"descname">END
</code></dt>
462 <dd><p>End configuration processing.
</p>
465 <dl class=
"describe">
467 <code class=
"descname">ERROR
</code></dt>
468 <dd><p>End configuration processing and throw an error.
</p>
473 <div class=
"section" id=
"environment">
474 <h2>ENVIRONMENT
<a class=
"headerlink" href=
"#environment" title=
"Permalink to this headline">¶
</a></h2>
476 <dt id=
"envvar-LIBMEMCACHED">
477 <code class=
"descname">LIBMEMCACHED
</code><a class=
"headerlink" href=
"#envvar-LIBMEMCACHED" title=
"Permalink to this definition">¶
</a></dt>
481 <div class=
"section" id=
"return-value">
482 <h2>RETURN VALUE
<a class=
"headerlink" href=
"#return-value" title=
"Permalink to this headline">¶
</a></h2>
483 <p><a class=
"reference internal" href=
"#_CPPv49memcachedPKc6size_t" title=
"memcached"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached()
</span></code></a> returns a pointer to the
<a class=
"reference internal" href=
"memcached_create.html#_CPPv412memcached_st" title=
"memcached_st"><code class=
"xref cpp cpp-any docutils literal notranslate"><span class=
"pre">memcached_st
</span></code></a> that was created (or
484 initialized). On an allocation failure, it returns NULL.
</p>
486 <div class=
"section" id=
"example">
487 <h2>EXAMPLE
<a class=
"headerlink" href=
"#example" title=
"Permalink to this headline">¶
</a></h2>
488 <div class=
"highlight-c notranslate"><div class=
"highlight"><pre><span></span><span class=
"k">const
</span> <span class=
"kt">char
</span> <span class=
"o">*
</span><span class=
"n">config_string
</span><span class=
"o">=
</span>
489 <span class=
"s">"--SERVER=host10.example.com
"</span>
490 <span class=
"s">"--SERVER=host11.example.com
"</span>
491 <span class=
"s">"--SERVER=host10.example.com
"</span><span class=
"p">;
</span>
492 <span class=
"n">memcached_st
</span> <span class=
"o">*
</span><span class=
"n">memc
</span><span class=
"o">=
</span> <span class=
"n">memcached
</span><span class=
"p">(
</span><span class=
"n">config_string
</span><span class=
"p">,
</span> <span class=
"n">strlen
</span><span class=
"p">(
</span><span class=
"n">config_string
</span><span class=
"p">));
</span>
493 <span class=
"p">{
</span>
494 <span class=
"c1">// ...
</span>
495 <span class=
"p">}
</span>
496 <span class=
"n">memcached_free
</span><span class=
"p">(
</span><span class=
"n">memc
</span><span class=
"p">);
</span>
500 <div class=
"section" id=
"see-also">
501 <h2>SEE ALSO
<a class=
"headerlink" href=
"#see-also" title=
"Permalink to this headline">¶
</a></h2>
503 <li><em class=
"manpage"><a class=
"manpage reference external" href=
"https://linux.die.net/man/1/memcached">memcached(
1)
</a></em></li>
504 <li><a class=
"reference internal" href=
"../libmemcached.html"><span class=
"doc">C/C++ Client Library for memcached
</span></a></li>
505 <li><a class=
"reference internal" href=
"memcached_strerror.html"><span class=
"doc">Converting Error Codes to Messages
</span></a></li>
516 <div class=
"rst-footer-buttons" role=
"navigation" aria-label=
"footer navigation">
518 <a href=
"constants.html" class=
"btn btn-neutral float-right" title=
"libmemcached Constants and Defaults" accesskey=
"n" rel=
"next">Next
<span class=
"fa fa-arrow-circle-right"></span></a>
521 <a href=
"index_misc.html" class=
"btn btn-neutral float-left" title=
"Miscellaneous" accesskey=
"p" rel=
"prev"><span class=
"fa fa-arrow-circle-left"></span> Previous
</a>
528 <div role=
"contentinfo">
530 © <a href=
"../copyright.html">Copyright
</a>
534 Built with
<a href=
"http://sphinx-doc.org/">Sphinx
</a> using a
<a href=
"https://github.com/rtfd/sphinx_rtd_theme">theme
</a> provided by
<a href=
"https://readthedocs.org">Read the Docs
</a>.
547 <script type=
"text/javascript">
549 SphinxRtdTheme.Navigation.enable(true);