From a99dd299752d43bbe5db665d8197eb093ea90093 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 + public/admin/purgecaches.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/admin/cli/purge_caches.php b/admin/cli/purge_caches.php index e79af0d051c..590d79e7696 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/public/admin/purgecaches.php b/public/admin/purgecaches.php index 30aa34fe5ea..7b6548e078a 100644 --- a/public/admin/purgecaches.php +++ b/public/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');