Commit b30b66c5 authored by Andrew Nicols's avatar Andrew Nicols
Browse files

MDL-61519 coursecat: Reset the coursecat cache on enrolment

parent bb0ca2c4
......@@ -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;
......
......@@ -134,6 +134,7 @@ $definitions = array(
'simpledata' => true,
'invalidationevents' => array(
'changesincoursecat',
'changesincategoryenrolment',
),
'ttl' => 900,
),
......
......@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2018031600.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2018031601.00; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment