mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-15 00:12:43 +09:00
Make object cache configurable via the admin UI
This commit is contained in:
parent
225f02cac2
commit
f3d3122787
10 changed files with 113 additions and 6 deletions
|
|
@ -656,6 +656,28 @@ class adminAdminController extends admin
|
|||
'domain' => preg_replace('@^https?://@', '', $default_url),
|
||||
));
|
||||
|
||||
// Object cache
|
||||
if ($vars->object_cache_type)
|
||||
{
|
||||
if ($vars->object_cache_type === 'memcached' || $vars->object_cache_type === 'redis')
|
||||
{
|
||||
$cache_config = $vars->object_cache_type . '://' . $vars->object_cache_host . ':' . intval($vars->object_cache_port);
|
||||
}
|
||||
else
|
||||
{
|
||||
$cache_config = $vars->object_cache_type;
|
||||
}
|
||||
if (!CacheHandler::isSupport($vars->object_cache_type, $cache_config))
|
||||
{
|
||||
return new Object(-1, 'msg_cache_handler_not_supported');
|
||||
}
|
||||
Rhymix\Framework\Config::set('cache', array($cache_config));
|
||||
}
|
||||
else
|
||||
{
|
||||
Rhymix\Framework\Config::set('cache', array());
|
||||
}
|
||||
|
||||
// Other settings
|
||||
Rhymix\Framework\Config::set('use_rewrite', $vars->use_rewrite === 'Y');
|
||||
Rhymix\Framework\Config::set('use_sso', $vars->use_sso === 'Y');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue