From 1a815ef7d43057296dfdd1e833dfd8c0b8b07fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20S=CC=8Ckoda?= Date: Thu, 12 Dec 2013 11:36:36 +0800 Subject: [PATCH] MDL-42973 fix MUC caching issue when fetching available updates --- lib/classes/update/checker.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/classes/update/checker.php b/lib/classes/update/checker.php index 22776270e30..b6ad40762a8 100644 --- a/lib/classes/update/checker.php +++ b/lib/classes/update/checker.php @@ -288,6 +288,12 @@ class checker { set_config('recentfetch', time(), 'core_plugin'); set_config('recentresponse', $response, 'core_plugin'); + if (defined('CACHE_DISABLE_ALL') and CACHE_DISABLE_ALL) { + // Very nasty hack to work around cache coherency issues on admin/index.php?cache=0 page, + // we definitely need to keep caches in sync when writing into DB at all times! + \cache_helper::purge_all(true); + } + $this->restore_response(true); }