mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Changed: only cache non-dynamic config settings
git-svn-id: file:///svn/phpbb/trunk@3935 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
44eb035adf
commit
3847fc47ec
1 changed files with 8 additions and 4 deletions
|
@ -181,8 +181,6 @@ $cache = new acm();
|
||||||
$template = new template();
|
$template = new template();
|
||||||
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
|
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
|
||||||
|
|
||||||
// 20030218 Ashe: $dbport is not set by the installer
|
|
||||||
|
|
||||||
// Grab global variables, re-cache if necessary
|
// Grab global variables, re-cache if necessary
|
||||||
if ($config = $cache->get('config'))
|
if ($config = $cache->get('config'))
|
||||||
{
|
{
|
||||||
|
@ -198,7 +196,7 @@ if ($config = $cache->get('config'))
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$config = array();
|
$config = $cached_config = array();
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . CONFIG_TABLE;
|
FROM ' . CONFIG_TABLE;
|
||||||
|
@ -206,11 +204,17 @@ else
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
|
if (!$row['is_dynamic'])
|
||||||
|
{
|
||||||
|
$cached_config[$row['config_name']] = $row['config_value'];
|
||||||
|
}
|
||||||
|
|
||||||
$config[$row['config_name']] = $row['config_value'];
|
$config[$row['config_name']] = $row['config_value'];
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$cache->put('config', $config);
|
$cache->put('config', $cached_config);
|
||||||
|
unset($cached_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue