.. enumerator:: MEMCACHED_BEHAVIOR_NO_BLOCK
- Causes `libmemcached` to use asynchronous IO. This is the fastest
- transport available for storage functions.
+ This enables `SO_LINGER` only, so the :manpage:`close(2)` call on the
+ socket returns immediately. I/O is always handled asynchronously in
+ recent versions of `libmemcached`.
.. enumerator:: MEMCACHED_BEHAVIOR_SND_TIMEOUT
This sets the microsecond behavior of the socket against the SO_SNDTIMEO
flag.
- In cases where you cannot use non-blocking IO this will allow you to
- still have timeouts on the sending of data.
-
.. enumerator:: MEMCACHED_BEHAVIOR_RCV_TIMEOUT
This sets the microsecond behavior of the socket against the SO_RCVTIMEO
flag.
- In cases where you cannot use non-blocking IO this will allow you to
- still have timeouts on the reading of data.
-
.. enumerator:: MEMCACHED_BEHAVIOR_TCP_NODELAY
Disables Nagle's algorithm.
.. enumerator:: MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
- In non-blocking mode this changes the value of the timeout during socket
- connection in milliseconds. Specifying -1 means an infinite time‐out.
+ Set the timeout during socket connection in milliseconds.
+ Specifying -1 means an infinite time‐out.
.. enumerator:: MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
.. enumerator:: MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS
- Specify the numbers of replicas `libmemcached` should store of each item
+ Specify the number of replicas `libmemcached` should store of each item
(on different servers).
This replication does not dedicate certain memcached servers to store
all of the other objects (on the 'n' next servers specified in your
server list).
+ Requires the binary protocol and only supports (M)GET/SET/DELETE.
+
+ **NOTE**: `libmemcached` does not guarantee nor enforce any consistency.
+
.. enumerator:: MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ
Allows randomizing the replica reads starting point. Normally the read
- is done from primary server and in case of miss the read is done from
+ is done from primary server and in case of failure the read is done from
primary + 1, then primary + 2 all the way to 'n' replicas.
- If this option is set on the starting point of the replica reads is
- randomized between the servers. This allows distributing read load to
- multiple servers with the expense of more write traffic.
+ This allows distributing read load to multiple servers with the expense
+ of more write traffic.
+
+ **NOTE**: Only errors to communicate with a server are considered
+ failures, so `MEMCACHED_NOTFOUND` does *not* account for failure.
.. enumerator:: MEMCACHED_BEHAVIOR_CORK