mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Allow connection to Memcached and Redis via unix socket
This commit is contained in:
parent
363f2feeac
commit
1042479d5b
4 changed files with 93 additions and 34 deletions
|
|
@ -725,10 +725,18 @@ class adminAdminController extends admin
|
|||
{
|
||||
if ($vars->object_cache_type === 'memcached' || $vars->object_cache_type === 'redis')
|
||||
{
|
||||
$cache_servers = array($vars->object_cache_type . '://' . $vars->object_cache_host . ':' . intval($vars->object_cache_port));
|
||||
if (starts_with('/', $vars->object_cache_host))
|
||||
{
|
||||
$cache_servers = array($vars->object_cache_host);
|
||||
}
|
||||
else
|
||||
{
|
||||
$cache_servers = array($vars->object_cache_type . '://' . $vars->object_cache_host . ':' . intval($vars->object_cache_port));
|
||||
}
|
||||
|
||||
if ($vars->object_cache_type === 'redis')
|
||||
{
|
||||
$cache_servers[0] .= '/' . intval($vars->object_cache_dbnum);
|
||||
$cache_servers[0] .= '#' . intval($vars->object_cache_dbnum);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue