memcache客户端“一致性hash算法”设置
Memcache?
修改php.ini添加:?
[Memcache]?
Memcache.allow_failover = 1?
Memcache.hash_strategy =consistent?
Memcache.hash_function =crc32?
ini_set方法:?
Ini_set(‘memcache.hash_strategy','
consistent?');?
Ini_set(‘memcache.hash_function','crc32');?
Memcached?
$mem = new memcached();?
$mem->setOption(Memcached::OPT_DISTRIBUTION,Memcached::DISTRIBUTION_CONSISTENT);?
$mem->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE,true);