From 7b79251c639147a70b3f3b50a4d0f1743ef11f56 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 16 Jul 2025 21:14:10 +0800 Subject: [PATCH] MDL-86049 core: Do not use the component cache before purge When trying to resolve a corrupt cache where it is not possible to complete the Moodle setup/bootstrap, it is necessary to ignore the current cache to load the cache purging infrastructure. --- admin/cli/purge_caches.php | 1 + admin/purgecaches.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/admin/cli/purge_caches.php b/admin/cli/purge_caches.php index 9846b2024b8..54c69a3a742 100644 --- a/admin/cli/purge_caches.php +++ b/admin/cli/purge_caches.php @@ -24,6 +24,7 @@ */ define('CLI_SCRIPT', true); +define('IGNORE_COMPONENT_CACHE', true); require(__DIR__.'/../../config.php'); require_once($CFG->libdir.'/clilib.php'); diff --git a/admin/purgecaches.php b/admin/purgecaches.php index c9658bde850..84412c11e32 100644 --- a/admin/purgecaches.php +++ b/admin/purgecaches.php @@ -23,6 +23,8 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +define('IGNORE_COMPONENT_CACHE', true); + require_once('../config.php'); require_once($CFG->libdir.'/adminlib.php');