mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-29 15:22:15 +09:00
Migrate cache configuration format, keeping backward compatibility
This commit is contained in:
parent
194cf3fa70
commit
050a507707
8 changed files with 70 additions and 28 deletions
|
|
@ -137,7 +137,13 @@ class ConfigParser
|
|||
// Convert cache configuration.
|
||||
if (isset($db_info->use_object_cache))
|
||||
{
|
||||
$config['cache'][] = $db_info->use_object_cache;
|
||||
if (!is_array($db_info->use_object_cache))
|
||||
{
|
||||
$db_info->use_object_cache = array($db_info->use_object_cache);
|
||||
}
|
||||
$config['cache']['type'] = preg_replace('/^memcache$/', 'memcached', preg_replace('/:.+$/', '', array_first($db_info->use_object_cache)));
|
||||
$config['cache']['ttl'] = 86400;
|
||||
$config['cache']['servers'] = in_array($config['cache']['type'], array('memcached', 'redis')) ? $db_info->use_object_cache : array();
|
||||
}
|
||||
|
||||
// Convert FTP configuration.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue