Credis_Cluster::byHash PHP Méthode

byHash() public méthode

Get the client that the key would hash to.
public byHash ( string $key ) : Credis_Client
$key string
Résultat Credis_Client
    public function byHash($key)
    {
        return $this->clients[$this->hash($key)];
    }

Usage Example

 public function testByHash()
 {
     $this->cluster->set('key', 'value');
     $this->assertEquals(6379, $this->cluster->byHash('key')->getPort());
 }