MDL-39472 MUC: Optimise cache::get_from_persist_cache

This commit is contained in:
sam marshall
2013-06-12 14:29:48 +08:00
committed by Dan Poltawski
parent 6117c578e4
commit 3a2e904098
2 changed files with 16 additions and 4 deletions
+5
View File
@@ -350,6 +350,11 @@ class cache_helper {
* @param string $definition
*/
protected static function ensure_ready_for_stats($store, $definition) {
// 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])) {
return;
}
if (!array_key_exists($definition, self::$stats)) {
self::$stats[$definition] = array(
$store => array(