Caches responses as static files on disk for lightning fast page loads.
1.3k
Stars
119
Forks
31
Open issues
10
Contributors
AI Analysis
Laravel Page Cache caches HTTP responses as static files on disk to serve pages without booting the PHP application, enabling significant performance gains for mostly-static sites. It's specialized for Laravel developers who want to keep dynamic functionality while caching static page content, not suitable for real-time or frequently-changing applications. Ideal for content-heavy Laravel sites where selective full-page caching provides measurable speed benefits.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
Laravel page caching via static file generation—lightweight, stable, for mostly-static PHP sites
Page Cache is a Laravel middleware package that caches full HTTP responses as static HTML files on disk, allowing subsequent requests to be served directly by the web server without invoking PHP. Built for Laravel applications with substantial static or infrequently-changing content, it trades invalidation complexity for dramatic performance gains on cached routes. Adoption appears concentrated in the Laravel ecosystem; real-world production usage is not well-documented but the pattern is sound and long-proven.
Created July 2016, Page Cache emerged during Laravel's v5 era as a pragmatic alternative to full static site generators for dynamic PHP applications. It reflects a design philosophy: if most of your site is static, cache aggressively at the HTTP boundary rather than at the query or object level. The package has tracked Laravel releases for a decade, currently supporting Laravel 11+ and PHP 8.2+.
The package gained modest initial traction (1,256 stars over 10 years) and has remained relatively stable. Recent activity shows continued maintenance—last push March 2026—but zero star growth in the past week and lower star count than related caching packages. Growth appears flat, suggesting the package has found a defined audience but is not expanding beyond its original niche of static-heavy Laravel sites.
Adoption not verified. No testimonials, case studies, or prominent production users mentioned in README. Download count not disclosed. Comparable packages (laravel-page-speed: 2,501 stars; phpfastcache: 2,408 stars) have higher visibility, suggesting Page Cache may serve a smaller or less publicly visible segment of the Laravel market. The pattern—full-page static file caching—is proven and widely used in production systems, but whether this specific package is used at scale remains undocumented.
Based on README, the package operates as HTTP middleware: it intercepts 200-status GET responses, serializes them to disk in a `/public/page-cache` directory tree, and relies on web server rewrite rules (nginx `try_files`, Apache `RewriteCond`) to serve cached files directly before invoking PHP. Appears to support multiple content types (HTML, JSON, XML). Architecture is deliberately simple—no in-memory cache, no distributed coordination, no cache headers logic beyond HTTP 200 filtering.
Not documented in README. Build status badge present but no mention of test suite, coverage percentage, or testing approach in provided excerpt.
Last push March 2026 (4 months before analysis date) indicates active maintenance. Package version tracks Laravel releases (v2.0 for Laravel 11+, with v1.0.9 legacy branch for Laravel v5-v10), suggesting responsive updates to framework changes. However, no recent activity spike; maintenance appears reactive rather than proactive. No indication of breaking issues or urgent refactoring.
ADOPT IF: your Laravel application is predominantly static or has long cache validity windows (news sites, docs, brochure pages); you control server configuration (nginx/Apache) and can implement URL rewriting; invalidation strategy is simple (e.g., cache-clear on deployment or on specific events); you want minimal operational overhead and don't need distributed cache. AVOID IF: your site has frequent dynamic content updates, require sub-request cache invalidation, run on managed hosting without rewrite control, or need fine-grained cache headers and TTLs. MONITOR IF: you're evaluating whether the simplicity-vs-flexibility tradeoff justifies adoption; test on a subset of routes first, as clearing requires manual deployment or cronjob-based invalidation.
Independent dimensions
Mainstream potential
3/10
Technical importance
6/10
Adoption evidence
2/10
- Cache invalidation complexity: no automatic expiry or TTL; clearing requires explicit command or deployment script; risk of stale content if invalidation process fails or is forgotten.
- Web server dependency: requires correct URL rewriting rules on nginx/Apache; misconfiguration silently breaks caching; not portable to serverless or restrictive managed hosting.
- Limited observability: README does not document logging, monitoring, or debugging tools; difficult to diagnose why a page isn't cached or whether caching is working as expected.
- Narrow adoption: lower star count and undocumented production usage raise uncertainty about real-world reliability at scale or in edge cases.
- Static file attack surface: cached files stored in web root (`/public/page-cache`); potential security implications if files are indexed or exposed; `.gitignore` required but easy to overlook.
Page Cache will likely remain stable and maintained within the Laravel ecosystem, but growth will remain modest. It solves a specific, well-defined problem for a niche (mostly-static Laravel sites) and does not compete with broader caching strategies (query caching, in-memory caches). Adoption may slowly increase as Laravel developers discover it, but mainstream dominance is unlikely; the package is more likely to remain a known-but-optional tool in the Laravel toolkit.
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- PHP
- License
- MIT
- Last updated
- 4mo ago
- Created
- 121mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
Solution, not issue: Caddy & Laravel in Dev
Generate cache error when concurrent requests occur
File Write Failure Due to Long URL Slugs in Page Cache
How to exclude search query?
Add application/vnd.api+json support so files are saved as .json file
Top contributors
Recent releases
Similar repos
spatie/laravel-responsecache
A Laravel middleware package that caches entire HTTP responses (HTML, JSON) to...
vinkius-labs/laravel-page-speed
Laravel Page Speed is a Laravel package that optimizes Blade-rendered pages and...
mike-bronner/laravel-model-caching
This package adds automatic, self-invalidating caching to Laravel Eloquent...
TruCopilot/phpfastcache
phpfastcache is a multi-backend caching abstraction layer for PHP that reduces...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
1.3k | — | PHP | 7/10 | 4mo ago |
|
|
2.8k | — | PHP | 8/10 | 2w ago |
|
|
2.5k | — | PHP | 7/10 | 1mo ago |
|
|
2.4k | — | PHP | 9/10 | 2d ago |
|
|
2.4k | — | PHP | 7/10 | 3mo ago |
|
|
1.1k | — | PHP | 7/10 | 4mo ago |
Higher star count (2,501 vs 1,256); scope appears broader (page speed optimization beyond caching). Direct comparison details unavailable from metadata.
Higher stars (2,408); general-purpose PHP caching library (not Laravel-specific); covers memory, file, Redis, Memcached backends. Page Cache is narrower and more opinionated.
Higher stars (2,369); operates at database query/model layer, not HTTP response layer. Different caching strategy; complementary rather than competitive.
Lower stars (1,131); simpler query-result caching. Focuses on ORM-level caching rather than full-page response caching.
Solve a related problem (static site generation) but require a build step. Page Cache trades off for zero build overhead on dynamic sites with mostly-static content.