mirror of
https://github.com/moodle/moodle.git
synced 2025-07-25 00:02:18 +02:00
Merge branch 'MDL-78092-master' of https://github.com/sammarshallou/moodle
This commit is contained in:
@@ -640,7 +640,10 @@ class course_modinfo {
|
||||
|
||||
$cachecoursemodinfo = cache::make('core', 'coursemodinfo');
|
||||
$cachekey = $course->id;
|
||||
$cachecoursemodinfo->acquire_lock($cachekey);
|
||||
if (!$cachecoursemodinfo->acquire_lock($cachekey)) {
|
||||
throw new moodle_exception('ex_unabletolock', 'cache', '', null,
|
||||
'Unable to lock modinfo cache for course ' . $cachekey);
|
||||
}
|
||||
try {
|
||||
// Only actually do the build if it's still needed after getting the lock (not if
|
||||
// somebody else, who might have been holding the lock, built it already).
|
||||
|
Reference in New Issue
Block a user