3 unsigned int memcached_generate_hash(char *key
, size_t key_length
)
5 unsigned int x
= key_length
;
7 unsigned int value
= 0;
12 value
+= (value
<< 10);
13 value
^= (value
>> 6);
15 value
+= (value
<< 3);
16 value
^= (value
>> 11);
17 value
+= (value
<< 15);
19 return value
== 0 ? 1 : value
;