MDL-42012 cache: Allow data sources to work when caching is disabled

This commit is contained in:
Andrew Nicols
2020-09-09 14:05:19 +08:00
parent 535523f21f
commit ef6e3bfd77
4 changed files with 68 additions and 19 deletions
+2 -1
View File
@@ -449,7 +449,8 @@ class cache_factory {
$definition = $instance->get_definition_by_id($id);
if (!$definition) {
throw new coding_exception('The requested cache definition does not exist.'. $id, $id);
} else if (!$this->is_disabled()) {
}
if (!$this->is_disabled() && !($this instanceof cache_factory_disabled)) {
debugging('Cache definitions reparsed causing cache reset in order to locate definition.
You should bump the version number to ensure definitions are reprocessed.', DEBUG_DEVELOPER);
}