public static function build_course_cache($course) {
        if (empty($course->id)) {
            throw new coding_exception('Object $course is missing required property \id\'');
        }

        $lock = self::get_course_cache_lock($course->id);
        try {
            return self::inner_build_course_cache($course, $lock);
        } finally {
            $lock->release();
        }
    }