-
Bug
-
Resolution: Fixed
-
Major
-
2.5
-
MOODLE_25_STABLE
-
MOODLE_25_STABLE
-
mdl26dev-
MDL-40130-let-course-category-caching-be-used -
In lib/coursecatlib.php, in the function make_categories_list:
$baselist = $coursecatcache->get($basecachekey);
|
if ($baselist !== false) {
|
$baselist = false;
|
}
|
This odd code results in the category list being cached later in the function, but never used.
On a Moodle with 1315 course categories, /course/index.php?id=x consistently results in about 2700 database queries.
If this is changed to:
if (!$baselist = $coursecatcache->get($basecachekey)) {
|
$baselist = false;
|
}
|
Then the same page consistently makes about 100 database queries (at least when the list is still cached).
- is duplicated by
-
MDL-40276 coursecat::make_categories_list() is inefficient
- Closed