특정 키가 풀의 모든 memcached 서버에 배포되는지 확인하는 방법에 대해 조금 생각했습니다.풀의 모든 서버에 쓰기 위해 memcached 강제 실행
나의 현재, 검증되지 않은 솔루션은 memcached와의 다른 인스턴스를 만들기 위해이 같은 것입니다 : 특정 키 신뢰성에 대한 모든 서버에 저장 될 필요가이 경우에 할 수있는 상식은 무엇
$cluster[] = array('host' => '192.168.1.1', 'port' => '11211', 'weight' => 50);
$this->tempMemcached = new Memcached;
$this->tempMemcached->addServers($cluster);
foreach ($this->cluster() as $cluster) {
$this->tempMemcached->setByKey($cluster, $key, $value, $this->compress, $expireTime);
}
$this->tempMemcache->close();
?
데이터를 읽을 때도 동일한 절차를 따라야합니다. –
@ 선 - 그걸 알아 :) @ 모두 : 현상금은 ON입니다! – Industrial