mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Improve cache efficiency when loading module part config
This commit is contained in:
parent
6d324633a5
commit
a949b95763
2 changed files with 3 additions and 3 deletions
|
|
@ -369,7 +369,7 @@ class DB
|
|||
$log['time'] = date('Y-m-d H:i:s');
|
||||
$log['backtrace'] = array();
|
||||
|
||||
if (config('debug.enabled') && config('debug.log_queries'))
|
||||
if (config('debug.enabled') && in_array('queries', config('debug.display_content')))
|
||||
{
|
||||
$bt = defined('DEBUG_BACKTRACE_IGNORE_ARGS') ? debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) : debug_backtrace();
|
||||
foreach($bt as $no => $call)
|
||||
|
|
|
|||
|
|
@ -1345,13 +1345,13 @@ class moduleModel extends module
|
|||
else $config = null;
|
||||
|
||||
//insert in cache
|
||||
Rhymix\Framework\Cache::set('site_and_module:module_part_config:' . $module . '_' . $module_srl, $config);
|
||||
Rhymix\Framework\Cache::set('site_and_module:module_part_config:' . $module . '_' . $module_srl, $config === null ? 0 : $config);
|
||||
$GLOBALS['__ModulePartConfig__'][$module][$module_srl] = $config;
|
||||
}
|
||||
return $GLOBALS['__ModulePartConfig__'][$module][$module_srl];
|
||||
}
|
||||
|
||||
return $config;
|
||||
return $config === 0 ? null : $config;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue