Exemplo n.º 1
0
 public function setUp()
 {
     $config = file_get_contents(REDIS_CONF);
     preg_match('#^\\s*port\\s+([0-9]+)#m', $config, $matches);
     $this->redis = new RedisApi('localhost', $matches[1]);
     $this->redis->prefix(REDIS_NAMESPACE);
     $this->redis->select(REDIS_DATABASE);
     // Flush redis
     $this->redis->flushall();
 }
Exemplo n.º 2
0
 public function __construct($host, $port = 6379, $password = null)
 {
     parent::__construct($host, $port, 5, $password);
 }