mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Fix #1602 support username/password for Redis cache
This commit is contained in:
parent
80b235001e
commit
2f0b6433bc
6 changed files with 22 additions and 3 deletions
|
|
@ -559,6 +559,8 @@ 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);
|
||||
Context::set('object_cache_user', parse_url(array_first($cache_servers), PHP_URL_USER) ?: null);
|
||||
Context::set('object_cache_pass', parse_url(array_first($cache_servers), PHP_URL_PASS) ?: null);
|
||||
$cache_dbnum = preg_replace('/[^\d]/', '', parse_url(array_first($cache_servers), PHP_URL_FRAGMENT) ?: parse_url(array_first($cache_servers), PHP_URL_PATH));
|
||||
Context::set('object_cache_dbnum', $cache_dbnum === '' ? 1 : intval($cache_dbnum));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue