=item MEMCACHED_BEHAVIOR_HASH
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, and MEMCACHED_HASH_FNV1A_32. The behavior for all hashes but MEMCACHED_HASH_DEFAULT is identitical to the Java driver written by Dustin Sallings.
+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.
=item MEMCACHED_BEHAVIOR_DISTRIBUTION
return MEMCACHED_SUCCESS;
}
+static memcached_return pre_jenkins(memcached_st *memc)
+{
+ memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_JENKINS);
+
+ return MEMCACHED_SUCCESS;
+}
+
+
static memcached_return pre_md5(memcached_st *memc)
{
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_MD5);
{"md5", pre_md5, 0, tests},
{"crc", pre_crc, 0, tests},
{"hsieh", pre_hsieh, 0, tests},
+ {"jenkins", pre_jenkins, 0, tests},
{"fnv1_64", pre_hash_fnv1_64, 0, tests},
{"fnv1a_64", pre_hash_fnv1a_64, 0, tests},
{"fnv1_32", pre_hash_fnv1_32, 0, tests},
{"generate_hsieh_consistent", enable_consistent, 0, generate_tests},
{"generate_md5", pre_md5, 0, generate_tests},
{"generate_murmur", pre_murmur, 0, generate_tests},
+ {"generate_jenkins", pre_jenkins, 0, generate_tests},
{"generate_nonblock", pre_nonblock, 0, generate_tests},
{"consistent_not", 0, 0, consistent_tests},
{"consistent_ketama", pre_behavior_ketama, 0, consistent_tests},