mirror of
https://github.com/moodle/moodle.git
synced 2025-03-15 05:00:06 +01:00
MDL-71899 performance: Improve course image caching
Changed to use get_course() instead of get_fast_modinfo() for better performance
This commit is contained in:
parent
443a980aea
commit
e0dd5f268a
3
course/classes/cache/course_image.php
vendored
3
course/classes/cache/course_image.php
vendored
@ -56,7 +56,8 @@ class course_image implements cache_data_source {
|
||||
* @return string|bool Returns course image url as a string or false if the image is not exist
|
||||
*/
|
||||
public function load_for_cache($key) {
|
||||
$course = get_fast_modinfo($key)->get_course();
|
||||
// We should use get_course() instead of get_fast_modinfo() for better performance.
|
||||
$course = get_course($key);
|
||||
return $this->get_image_url_from_overview_files($course);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user