MDL-57427 cache: Use perfdebug only when enabled

This commit is contained in:
Jonathan Champ 2016-12-16 12:20:45 -05:00 committed by Jonathan Champ
parent 8ed0851a5e
commit d3a6b91aec
2 changed files with 54 additions and 1 deletions

View file

@ -213,7 +213,7 @@ class cache implements cache_loader {
$this->definition = $definition;
$this->store = $store;
$this->storetype = get_class($store);
$this->perfdebug = !empty($CFG->perfdebug);
$this->perfdebug = (!empty($CFG->perfdebug) and $CFG->perfdebug > 7);
if ($loader instanceof cache_loader) {
$this->loader = $loader;
// Mark the loader as a sub (chained) loader.