修改 apps/configs/redis.php ,加入配置。
$redis['master'] = array(
'host' => '172.19.104.157',
'port' => 6379, //默认为6379
//'database' => 16, //数据库ID,可选
);
$this->redis->get($key)
,框架会读取$this->config['redis']['master']
作为配置$this->redis('master2')->get($key)
实现多实例访问,框架会读取$this->config['redis']['master2']
作为配置