1 .TH "MEMCACHED_CREATE_WITH_OPTIONS" "3" "April 09, 2011" "0.47" "libmemcached"
3 memcached_create_with_options \- libmemcached Documentation
5 .nr rst2man-indent-level 0
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
17 .\" .rstReportMargin pre:
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
25 .\" indent \\n[an-margin]
26 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27 .nr rst2man-indent-level -1
28 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
31 .\" Man page generated from reStructeredText.
36 .B memcached_st *memcached_create_with_options(const char\fI\ *string\fP, size_t\fI\ string_length\fP)
40 .B memcached_return_t libmemcached_check_configuration(const char\fI\ *option_string\fP, size_t\fI\ length\fP, char\fI\ *error_buffer\fP, size_t\fI\ error_buffer_size\fP)
43 Compile and link with \-lmemcached
46 Libmemcached implements a custom language for configuring and modifying
47 servers. By passing in an option string you can generate a memcached_st object
48 that you can use in your application directly.
51 .B \-\-SERVER=<servername>:<optional_port>/?<optional_weight>
54 Provide a servername to be used by the client. Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1.
60 Verify that keys that are being used fit within the design of the protocol being used.
63 .B \-\-REMOVE_FAILED_SERVERS
66 Enable the behavior MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS.
69 .B \-\-BINARY\-PROTOCOL
72 Force all connections to use the binary protocol.
75 .B \-\-BUFFER\-REQUESTS
78 Enable MEMCACHED_BEHAVIOR_BUFFER_REQUESTS.
81 .B \-\-CONFIGURE\-FILE=
84 Provide a configuration file to be used to load requests. Beware that by using a configuration file libmemcached will reset memcached_st based on information only contained in the file.
87 .B \-\-CONNECT\-TIMEOUT=
90 Enable MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT.
96 Set the distribution model used by the client. See :manpage:\(ga\(ga for more details.
102 Set the hashing alogrthm used for placing keys on servers.
105 .B \-\-HASH\-WITH\-PREFIX_KEY
109 .B \-\-IO\-BYTES\-WATERMARK=
113 .B \-\-IO\-KEY\-PREFETCH=
117 .B \-\-IO\-MSG\-WATERMARK=
125 .B \-\-NUMBER\-OF\-REPLICAS=
128 Set the nummber of servers that keys will be replicated to.
131 .B \-\-POLL\-TIMEOUT=
135 .B \-\-RANDOMIZE\-REPLICA\-READ
138 Select randomly the server within the replication pool to read from.
145 .B \-\-RETRY\-TIMEOUT=
148 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
151 .B \-\-SERVER\-FAILURE\-LIMIT=
154 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
160 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SND_TIMEOUT
163 .B \-\-SOCKET\-RECV\-SIZE=
166 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
169 .B \-\-SOCKET\-SEND\-SIZE=
172 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
178 When adding new servers always calculate their distribution based on sorted naming order.
184 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SUPPORT_CAS
190 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_NODELAY
193 .B \-\-TCP\-KEEPALIVE
196 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_KEEPALIVE
206 See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_USE_UDP
216 Include a file in configuration. Unlike \-\-CONFIGURE\-FILE= this will not reset memcached_st
222 Reset memcached_st and continue to process.
228 End configutation processing.
234 End configutation processing and throw an error.
237 memcached_create_with_options() returns a pointer to the memcached_st that was
238 created (or initialized). On an allocation failure, it returns NULL.
243 const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com"
244 memcached_st *memc= memcached_create_with_options(config_string, strlen(config_string);
248 memcached_free(memc);
253 To find out more information please check:
254 \fI\%https://launchpad.net/libmemcached\fP
257 \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
261 2011, Brian Aker DataDifferential, http://datadifferential.com/
262 .\" Generated by docutils manpage writer.