Performance
EduLab LMS is optimised out of the box for shared hosting. This page covers the built-in caching layers and additional steps you can take to maximise speed.
Built-in Caching
| Data | Cache Key | TTL | Invalidated When |
|---|---|---|---|
| Theme settings (all) | options | Forever | Any setting is saved |
| Active theme list | lms_themes | 10 min | — (auto-expire) |
| Geolocation per IP | geo_<ip_hash> | 24 hours | — (auto-expire) |
| Application config state | lms_app_cfg | 2 hours | License is activated / removed |
| Language list | languages singleton | Per-request | — |
Cache is tenant-aware when the SaaS module is active — the tenancy bootstrapper automatically prefixes cache keys per tenant.
Recommended: Enable Cache Driver
By default Laravel uses the file cache driver. Switch to database or redis for better performance:
Database cache (works on all shared hosts):
php artisan cache:table
php artisan migrateThen in .env:
CACHE_STORE=databaseRedis (recommended for VPS/dedicated):
CACHE_STORE=redis
REDIS_HOST=127.0.0.1
REDIS_PORT=6379Artisan Optimize Commands
Run these after each update or configuration change:
php artisan optimize # Cache config + routes + views
php artisan config:cache # Cache config only
php artisan route:cache # Cache routes only
php artisan view:cache # Pre-compile all Blade viewsThese commands are also available via Admin → Dashboard → Optimize Cache.
To clear all caches:
php artisan optimize:clearDatabase Indexes
Version 3.0 ships with a migration that adds indexes on the most frequently queried columns:
courses:slug,status,category_idcategories:slugpurchase_details:typeblogs:slugtheme_settings:keyusers:guard
Run php artisan migrate after updating to apply them.
Shared Hosting Tips
- Enable OPcache in your PHP configuration — this is the single biggest win on shared hosting.
- Set
APP_DEBUG=falsein.envon live sites. - Avoid using the
syncqueue driver on slow connections — usedatabasequeue instead. - Schedule the Laravel scheduler via a single cron entry:
* * * * * cd /path/to/project && php artisan schedule:run >> /dev/null 2>&1