Configuration

What’s cached

Caching for production

Cache configuration

Merges all config/*.php files into a single cached file. Must be re-run after any config change.

Cache routes

Caches all route registrations. Must be re-run after any route change.

Clear all caches

Or all at once:

Database cache tables

Best practices

  1. Development: Use file or database driver — no setup needed
  2. Production: Use redis for speed and scalability
  3. Always cache config and routes in production
  4. Clear cache after deployments
  5. Don’t cache user-specific data in shared cache — use session instead