From 6b4ae63ac8990a4560b95cce2d97da1ffe62ee1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0koda?= Date: Sun, 29 Dec 2013 15:46:50 +0800 Subject: [PATCH] MDL-43511 do not cache the MUC cache in question code --- question/engine/bank.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/question/engine/bank.php b/question/engine/bank.php index 71a08b0dc3c..5950af6734d 100644 --- a/question/engine/bank.php +++ b/question/engine/bank.php @@ -439,9 +439,6 @@ class question_finder implements cache_data_source { /** @var question_finder the singleton instance of this class. */ protected static $questionfinder = null; - /** @var cache the question definition cache. */ - protected $cache = null; - /** * @return question_finder a question finder. */ @@ -461,10 +458,8 @@ class question_finder implements cache_data_source { * @return get the question definition cache we are using. */ protected function get_data_cache() { - if ($this->cache == null) { - $this->cache = cache::make('core', 'questiondata'); - } - return $this->cache; + // Do not double cache here because it may break cache resetting. + return cache::make('core', 'questiondata'); } /**