mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-12 07:11:42 +09:00
Add DB number to redis cache settings, and set the default to 1
This commit is contained in:
parent
503a332f9b
commit
8f9eacee64
8 changed files with 23 additions and 6 deletions
4
common/framework/drivers/cache/redis.php
vendored
4
common/framework/drivers/cache/redis.php
vendored
|
|
@ -29,12 +29,13 @@ class Redis implements \Rhymix\Framework\Drivers\CacheInterface
|
|||
{
|
||||
try
|
||||
{
|
||||
$this->_conn = new \Redis;
|
||||
$this->_conn = null;
|
||||
foreach ($config as $url)
|
||||
{
|
||||
$info = parse_url($url);
|
||||
if (isset($info['host']) && isset($info['port']))
|
||||
{
|
||||
$this->_conn = new \Redis;
|
||||
$this->_conn->connect($info['host'], $info['port'], 0.15);
|
||||
if(isset($info['user']) || isset($info['pass']))
|
||||
{
|
||||
|
|
@ -47,7 +48,6 @@ class Redis implements \Rhymix\Framework\Drivers\CacheInterface
|
|||
break;
|
||||
}
|
||||
}
|
||||
$this->_conn = null;
|
||||
}
|
||||
catch (\RedisException $e)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue