Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion classes/cache_factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public function create_config_instance($writer = false) {

if (!array_key_exists($class, $this->configs)) {
// Create a new instance and call it to load it.
// As part of generating store instance config we test the initialisation of stores.
// Testing this may initialise DI, which will attempt to use cache for hookcallbacks.
// Setting the state to initialising will make it use ad-hoc cache for that request.
self::set_state(self::STATE_INITIALISING);
$this->configs[$class] = new $class;
$this->configs[$class]->load();
}
Expand All @@ -67,7 +71,7 @@ public function create_config_instance($writer = false) {
$this->set_state(self::STATE_STORES_DISABLED);
} else {
// We cannot directly set the state to enabled from disabled.
// So we instead start and finish an update.
// So we instead start and finish an update to set STATE_READY.
$this->updating_started();
$this->updating_finished();
}
Expand Down
Loading