mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Add Redis AUTH command
This commit is contained in:
parent
8c4ee529cd
commit
fcafcb9833
1 changed files with 4 additions and 0 deletions
4
classes/cache/CacheRedis.class.php
vendored
4
classes/cache/CacheRedis.class.php
vendored
|
|
@ -52,6 +52,10 @@ class CacheRedis extends CacheBase
|
|||
$this->redis = new Redis;
|
||||
$info = parse_url($url);
|
||||
$this->redis->connect($info['host'], $info['port'], 0.15);
|
||||
if(isset($info['user']) || isset($info['pass']))
|
||||
{
|
||||
$this->redis->auth(isset($info['user']) ? $info['user'] : $info['pass']);
|
||||
}
|
||||
if(isset($info['path']) && $dbnum = intval(substr($info['path'], 1)))
|
||||
{
|
||||
$this->redis->select($dbnum);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue