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:
+2
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user