Purge Moodle caches across all instances or specific versions
/plugin marketplace add astoeffer/plugin-marketplace/plugin install server-ops@astoeffer-dev-pluginsPurge Moodle caches for one or all instances in the development environment.
Use AskUserQuestion to ask:
docker exec moodle-dev php8.1 /opt/moodle-MOODLE_401_STABLE/admin/cli/purge_caches.php
docker exec moodle-dev php8.1 /workspace/moodle-dh-prod/admin/cli/purge_caches.php
docker exec moodle-dev php8.2 /opt/moodle-MOODLE_405_STABLE/admin/cli/purge_caches.php
docker exec moodle-dev php8.3 /opt/moodle-MOODLE_501_STABLE/admin/cli/purge_caches.php
Pre-check
docker ps | grep moodle-devExecute cache purge
Verify
Additional actions (optional, ask user)
MOODLE CACHE PURGE
==================
Moodle 4.5: ✓ Cache purged successfully
Moodle 5.1: ✓ Cache purged successfully
Time taken: 2.3 seconds
Inform user that this purges all caches including:
If cache purge fails: