-
Bug
-
Resolution: Fixed
-
Major
-
4.4 regressions, 4.4, 4.4.1
With the implementation of MDL-80985 Add --courses argument to purge_caches.php into Moodle 4.4 onward. I have found that this severely slows down many operations within Moodle (drastically so on larger implementations). Upgrades, uninstall of plugins and essentially anywhere in the code that implements a full purge caches (which now includes a full course cache purge).
The course cache purge leverages the "increment_revision_number" function from /lib/datalib.php around line 1184. This ultimately means on any cache purge it's setting a new cacherev number for each mdl_course id in the database. I have found that this is delaying the start of Moodle upgrades and quite a few other operations in Moodle.
On further investigation, there's quite a few places in the Moodle code that call for the "purge_all_caches" function which is forcing a full cacherev overhaul each time and processes are waiting for this to finish.
Anywhere the 'purge_all_caches' function is called it's forcing the full purge and the difference between a purge caches with and without courses can be seen attached (2 seconds vs 14 minutes)
Some scripts call the full purge twice too, so you can imaging the impact this is having on normal operations.
- has a non-specific relationship to
-
MDL-82075 Extremely slow cache purging step during upgrades
- Closed
-
MDL-82399 Add "Courses" to list of selected purged caches in admin UI
- Waiting for peer review
- is a regression caused by
-
MDL-80985 Add --courses argument to purge_caches.php
- Closed
- will help resolve
-
MDL-82075 Extremely slow cache purging step during upgrades
- Closed