mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
9bb19e5827
Some recursive functions call get_categories() repeatedly to get all of the child categories of the current one. This commit create a lazily-initialized cache of all of the categories so that the database is only queried once to retrieve all of the categories. It speeds up the both the homepage and the course edit page (where the categories are displayed in combo boxes).