mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-50949 cache: Performance debug keeps track of hits/misses/sets
This commit is contained in:
parent
d84625438e
commit
e75115810c
4
cache/classes/helper.php
vendored
4
cache/classes/helper.php
vendored
@ -354,7 +354,7 @@ class cache_helper {
|
||||
protected static function ensure_ready_for_stats($store, $definition, $mode = cache_store::MODE_APPLICATION) {
|
||||
// This function is performance-sensitive, so exit as quickly as possible
|
||||
// if we do not need to do anything.
|
||||
if (isset(self::$stats[$definition][$store])) {
|
||||
if (isset(self::$stats[$definition]['stores'][$store])) {
|
||||
return;
|
||||
}
|
||||
if (!array_key_exists($definition, self::$stats)) {
|
||||
@ -368,7 +368,7 @@ class cache_helper {
|
||||
)
|
||||
)
|
||||
);
|
||||
} else if (!array_key_exists($store, self::$stats[$definition])) {
|
||||
} else if (!array_key_exists($store, self::$stats[$definition]['stores'])) {
|
||||
self::$stats[$definition]['stores'][$store] = array(
|
||||
'hits' => 0,
|
||||
'misses' => 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user