A Laravel package that caches HTTP responses as static files on disk for lightning-fast page loads.
Laravel Page Cache is a middleware package for Laravel applications that caches HTTP responses as static files on disk. It solves the performance problem of repeatedly booting a full PHP application to serve static or semi-static pages by serving pre-generated HTML, JSON, or XML files directly from the filesystem.
Laravel developers building content-heavy websites, blogs, or applications with pages that change infrequently and would benefit from reduced server load and faster response times.
Developers choose Laravel Page Cache because it seamlessly integrates with Laravel's middleware system, requires minimal configuration, and provides near-instant page loads by serving static files without touching the PHP application stack, all while maintaining the ability to easily clear and update the cache.
Caches responses as static files on disk for lightning fast page loads.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Caches successful GET responses as HTML, JSON, or XML files on disk, serving them directly without booting Laravel, leading to near-instant page loads as described in the introduction.
Integrates into Laravel's middleware stack for global or route-specific caching with minimal code changes, shown in the middleware setup instructions.
Includes ready-to-use configuration examples for nginx and Apache to serve cached files directly, optimizing performance at the server level.
Provides Artisan commands to clear the entire cache or specific pages recursively, making updates manageable when added to deployment scripts.
Cache must be cleared manually via Artisan commands or deployment scripts; content updates don't reflect until cache is cleared, risking stale data.
Requires web server (nginx/Apache) setup to serve cached files, adding deployment overhead and potential issues in non-standard environments.
Only caches GET requests with 200 status codes; dynamic or personalized content requires custom middleware extensions, increasing development effort.