mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +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
|
|
@ -515,11 +515,14 @@ class adminAdminView extends admin
|
|||
{
|
||||
Context::set('object_cache_host', parse_url(array_first($cache_servers), PHP_URL_HOST) ?: null);
|
||||
Context::set('object_cache_port', parse_url(array_first($cache_servers), PHP_URL_PORT) ?: null);
|
||||
$cache_dbnum = preg_replace('/[^\d]/', '', parse_url(array_first($cache_servers), PHP_URL_PATH));
|
||||
Context::set('object_cache_dbnum', $cache_dbnum === '' ? 1 : intval($cache_dbnum));
|
||||
}
|
||||
else
|
||||
{
|
||||
Context::set('object_cache_host', null);
|
||||
Context::set('object_cache_port', null);
|
||||
Context::set('object_cache_dbnum', 1);
|
||||
}
|
||||
|
||||
// Thumbnail settings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue