The weight of the php call to memcahe is invalid {code...} the weight of the php call to memcahe is invalid
PHP uses the Memcached extension addServers to use the weight, but the result is still and the weight is. why?
AddServers ([// ['123. 168.33.4 ', 11,,10], ['2017. 168.33.4 ', 11202,0]); // $ mem-> setOption (Memcached: OPT_DISTRIBUTION, Memcached: DISTRIBUTION_CONSISTENT); // $ mem-> setOption (Memcached: OPT_HASH, memcached: HASH_MD5); for ($ I = 0; $ I <10000; $ I ++) {$ key = md5 (uniqid ($ I. '_'); $ mem-> add ($ key, '1 ');}
Reply: The weight of the php call to memcahe is invalid.
PHP uses the Memcached extension addServers to use the weight, but the result is still and the weight is. why?
AddServers ([// ['123. 168.33.4 ', 11,,10], ['2017. 168.33.4 ', 11202,0]); // $ mem-> setOption (Memcached: OPT_DISTRIBUTION, Memcached: DISTRIBUTION_CONSISTENT); // $ mem-> setOption (Memcached: OPT_HASH, memcached: HASH_MD5); for ($ I = 0; $ I <10000; $ I ++) {$ key = md5 (uniqid ($ I. '_'); $ mem-> add ($ key, '1 ');}
Conclusion:
1. the weight is valid only when consistent hash is used.
2. OPT_LIBKETAMA_COMPATIBLE must be used for consistent hash.
*
Question: The two parameters must take effect at the same time. why do we need two parameters?