memcached_behavior_get (memcached_st *ptr,
memcached_behavior flag);
- memcached_return
+ memcached_return_t
memcached_behavior_set (memcached_st *ptr,
memcached_behavior flag,
uint64_t data);
Makes the default hashing algorithm for keys use MD5. The value can be set
to either MEMCACHED_HASH_DEFAULT, MEMCACHED_HASH_MD5, MEMCACHED_HASH_CRC, MEMCACHED_HASH_FNV1_64, MEMCACHED_HASH_FNV1A_64, MEMCACHED_HASH_FNV1_32, MEMCACHED_HASH_FNV1A_32, MEMCACHED_HASH_JENKINS, MEMCACHED_HASH_HSIEH, and MEMCACHED_HASH_MURMUR.
-Each hash has it's advantages and it's weaknesses. If you dont know or dont care, just go with the default.
+Each hash has it's advantages and it's weaknesses. If you don't know or don't care, just go with the default.
Support for MEMCACHED_HASH_HSIEH is a compile time option that is disabled by default. To enable support for this hashing algorithm, configure and build libmemcached with the --enable-hash_hsieh.
=item MEMCACHED_BEHAVIOR_DISTRIBUTION
replicas in, but instead it will store the replicas together with all of the
other objects (on the 'n' next servers specified in your server list).
+=item 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 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.
+
+=item MEMCACHED_BEHAVIOR_CORK
+
+Enable TCP_CORK behavior. This is only available as an option Linux.
+MEMCACHED_NO_SERVERS is returned if no servers are available to test with.
+MEMCACHED_NOT_SUPPORTED is returned if we were not able to determine
+if support was available. All other responses then MEMCACHED_SUCCESS
+report an error of some sort. This behavior also enables
+MEMCACHED_BEHAVIOR_TCP_NODELAY when set.
+
+=item MEMCACHED_BEHAVIOR_KEEPALIVE
+
+Enable TCP_KEEPALIVE behavior.
+
+=item MEMCACHED_BEHAVIOR_KEEPALIVE_IDLE
+
+Specify time, in seconds, to mark a connection as idle. This is only available as an option Linux.
+
+=item MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+
+Find the current size of SO_SNDBUF. A value of 0 means either an error
+occured or no hosts were available. It is safe to assume system default
+if this occurs. If an error occurs you can checked the last cached errno statement to find the specific error.
+
+=item MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+
+Find the current size of SO_RCVBUF. A value of 0 means either an error
+occured or no hosts were available. It is safe to assume system default
+if this occurs. If an error occurs you can checked the last cached errno statement to find the specific error.
+
+=item MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+
+This number of times a host can have an error before it is disabled.
+
+=item MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS
+
+If enabled any hosts which have been flagged as disabled will be removed
+from the list of servers in the memcached_st structure. This must be used
+in combination with MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT.
+
+=item MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+
+When enabled a host which is problematic will only be checked for usage
+based on the amount of time set by this behavior.
+
+=item MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY
+
+When enabled the prefix key will be added to the key when determining
+server by hash.
+
=back
=head1 RETURN
=head1 HOME
To find out more information please check:
-L<http://tangent.org/552/libmemcached.html>
+L<https://launchpad.net/libmemcached>
=head1 AUTHOR