Command 'route:cache' not found after Lumen upgrade
28K reputation · 05 Jan 2023, 22:00 UTC
Scenario
After upgrading a Lumen application, attempting to run php artisan route:cache results in the error Command 'route:cache' not found. The command is intentionally omitted from Lumen’s Artisan command set to keep the framework lightweight.
Recovery Context
When a developer mistakenly enables route caching during or after an upgrade, stale route definitions can persist, leading to routing failures. The framework provides no built‑in mechanism to cache routes, so the typical recovery path involves rolling back composer dependencies, clearing compiled services, and ensuring that no route‑caching commands are executed. However, the exact sequence of safe steps is not documented as a single procedure.
Unresolved Decision
Lumen’s documentation states that route caching is not supported, but it does not clarify whether this limitation will be revisited. The community has not reached consensus on whether optional route‑caching support should be added in future releases.
Specific Questions
- What is the recommended safe recovery workflow for a Lumen project that has triggered the
Command 'route:cache' not founderror after an upgrade? - Is there an officially supported method to enable route caching in Lumen, or must developers rely on third‑party packages?
- Will the Lumen roadmap consider adding optional route‑caching support, and what factors influence that decision?