Pergunta

Eu estou usando Memcached biblioteca PHP (baseado em libmemcached) e eu estou querendo saber como eu posso mudar constantes pré-definidas em PHP. Eu gostaria de usar a distribuição de chaves baseado em Ketama.

Memcached é compilado como uma extensão do PHP.

Obrigado.

Foi útil?

Solução

uso setOption:

$this->_Memcache =& new Memcached();
$this->_Memcache->setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_PHP);
$this->_Memcache->setOption(Memcached::OPT_NO_BLOCK, true);
$this->_Memcache->setOption(Memcached::OPT_TCP_NODELAY, true);
$this->_Memcache->setOption(Memcached::OPT_BUFFER_WRITES, true);
$this->_Memcache->setOption(Memcached::OPT_SERVER_FAILURE_LIMIT,3);
$this->_Memcache->setOption(Memcached::OPT_HASH,Memcached::HASH_CRC);

etc ... etc ...

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top