Moodle 5.2 Redis® Setup: Sessions + MUC Caching
OpenEduOps
0:00 / 0:00
Moodle 5.2 Redis® Setup: Sessions + MUC Caching
89 просмотров · 1 месяц назад
OpenEduOps
27 подписчиков
89 просмотров · 1 месяц назад
Move Moodle 5.2 login sessions and Moodle Universal Cache (MUC) to a private local Redis® service—then verify that the data survives a graceful restart and that purging MUC does not log out an active user.
📘 COMPLETE COMPANION GUIDE
https://gist.github.com/OpenEduOpsLab...
In this production-aware tutorial, you will:
Configure Redis separately for Moodle browser sessions and MUC caches.
Keep port 6379 on loopback and prove that Redis is not publicly reachable.
Verify namespace separation, graceful-restart persistence, safe cache purging, and rollback readiness.
The guide contains the commands, prerequisites, configuration values, verification checks, troubleshooting paths, production considerations, and rollback procedures used in this tutorial.
⏱️ CHAPTERS
00:00 Move Moodle sessions and cache to Redis
00:38 Introduction and safety boundary
01:47 Step 0 — Confirm and protect the starting point
03:56 Step 1 — Install Redis and its PHP extension
05:35 Step 2 — Prove Redis is private
07:49 Step 3 — Move user sessions to Redis
11:12 Step 4 — Move Moodle caches to Redis
15:57 Step 5 — Test restart persistence
17:37 Step 6 — Purge caches without losing the login
19:49 Final proof
21:00 Closing recap
🧪 TESTED ENVIRONMENT
Ubuntu Server 24.04 LTS
Moodle 5.2.1
Apache 2.4 with PHP 8.3
redis-server and php-redis from the Ubuntu repositories
Redis bound to the local loopback interface on port 6379
Single-VPS public demonstration environment
⚠️ PRODUCTION NOTE
This tutorial demonstrates a single-server design in which Moodle, Apache, and Redis share one VPS. It does not provide Redis replication, failover, or high availability, and it does not claim a measured performance gain. Changing Moodle's session backend also invalidates existing file-backed sessions, so use a maintenance window, notify users, and verify a current recovery point before making the change on a live site.
📚 OFFICIAL DOCUMENTATION
Moodle 5.2 — Redis cache store:
https://docs.moodle.org/502/en/Redis_...
Moodle 5.2 — Session handling:
https://docs.moodle.org/502/en/Sessio...
Moodle 5.2 — Caching:
https://docs.moodle.org/502/en/Caching
Moodle config-dist.php session examples:
https://github.com/moodle/moodle/blob...
Redis security:
https://redis.io/docs/latest/operate/...
Redis persistence:
https://redis.io/docs/latest/operate/...
OpenEduOps provides independent educational content and is not affiliated with, endorsed by, sponsored by, supported by, or certified by Moodle Pty Ltd or Redis Ltd.
Moodle and the associated Moodle logos are trademarks or registered trademarks of Moodle Pty Ltd or its related affiliates.
Redis is a registered trademark of Redis Ltd. Any rights therein are reserved to Redis Ltd.
Disclosure: This video is not sponsored and contains no affiliate links.
OpenEduOps — Build it. Secure it. Understand it.
#Moodle #Redis #OpenEduOps