MDL-61519 coursecat: Reset the coursecat cache on enrolment
This commit is contained in:
@@ -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,
|
||||
),
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user