mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-61519 coursecat: Reset the coursecat cache on enrolment
This commit is contained in:
parent
bb0ca2c4a3
commit
b30b66c57e
@ -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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user