mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[task/config-class] Do not create multiple cache driver instances.
Retrieve the driver from the service instead of creating new ones over and over from the factory. PHPBB3-9988
This commit is contained in:
@@ -55,8 +55,8 @@ if (isset($_GET['avatar']))
|
||||
|
||||
// set up caching
|
||||
$cache_factory = new phpbb_cache_factory($acm_type);
|
||||
$class_loader->set_cache($cache_factory->get_driver());
|
||||
$cache = $cache_factory->get_service();
|
||||
$class_loader->set_cache($cache->get_driver());
|
||||
|
||||
$db = new $sql_db();
|
||||
|
||||
@@ -70,7 +70,7 @@ if (isset($_GET['avatar']))
|
||||
// worst-case default
|
||||
$browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : 'msie 6.0';
|
||||
|
||||
$config = new phpbb_config_db($db, $cache_factory->get_driver(), CONFIG_TABLE);
|
||||
$config = new phpbb_config_db($db, $cache->get_driver(), CONFIG_TABLE);
|
||||
set_config(null, null, null, $config);
|
||||
set_config_count(null, null, null, $config);
|
||||
|
||||
|
Reference in New Issue
Block a user