MDL-61519 coursecat: Reset the coursecat cache on enrolment

This commit is contained in:
Andrew Nicols
2018-03-21 09:07:46 +08:00
parent 78928a3537
commit 65fa7c7d15
3 changed files with 5 additions and 1 deletions
+3
View File
@@ -722,6 +722,9 @@ class coursecat implements renderable, cacheable_object, IteratorAggregate {
return;
}
// Trigger a purge for all caches listening for changes to category enrolment.
cache_helper::purge_by_event('changesincategoryenrolment');
if (!$CFG->coursecontact || !in_array($roleid, explode(',', $CFG->coursecontact))) {
// The role is not one of course contact roles.
return;
+1
View File
@@ -134,6 +134,7 @@ $definitions = array(
'simpledata' => true,
'invalidationevents' => array(
'changesincoursecat',
'changesincategoryenrolment',
),
'ttl' => 900,
),
+1 -1
View File
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2017111302.00; // 20171113 = branching date YYYYMMDD - do not modify!
$version = 2017111302.01; // 20171113 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.