Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Html Cache Laravel Package

capell-app/html-cache

A Laravel HTML caching package that stores rendered page output and serves cached responses quickly, reducing database queries and server load. Easy to integrate with minimal configuration, it speeds up repeat visits and improves response times for Capell apps.

View on GitHub
Deep Wiki
Context7

Full-page static HTML cache for Capell with dependency-indexed invalidation, scheduled stale-regeneration, and public-output safety guarantees.

Frequently asked questions about Html Cache
What is capell-app/html-cache used for in Laravel?
It adds a lightweight full-page HTML response cache to Laravel applications. The package stores fully rendered pages and serves the cached HTML on later requests, reducing render time and database load for content that changes infrequently. It is intended for cacheable, route-addressable pages rather than personalized or authenticated responses.
How do I install capell-app/html-cache in a Laravel app?
Install it with Composer using composer require capell-app/html-cache. Then publish the package configuration and register its middleware in the HTTP kernel or on a route group. A safe rollout is to install with caching disabled first, confirm the app boots cleanly, and then enable it for selected routes.
Which Laravel and PHP versions are supported by capell-app/html-cache?
The provided release notes for v1.0.52 do not confirm a tested Laravel or PHP support matrix. Check the package's composer.json constraints and README before adopting it in a production project. Treat version compatibility as something to validate in a spike rather than assuming it from the 1.0.x release line.
How do I configure cache lifetime and per-route rules?
The package provides configurable cache lifetime and per-route caching rules through its published configuration. Define which routes are allowed to be cached and how long each response may be served from cache. Also define a bypass list for routes that must never be cached, such as authenticated or personalized pages.
How does the middleware capture and replay cached HTML?
The middleware captures the fully rendered response and stores the HTML in a configured Laravel cache store. On later requests it can replay that cached HTML before the route runs, short-circuiting routing, Blade rendering, and database access. The practical benefit depends on choosing routes where a bounded staleness window is acceptable.
Which cache stores work with capell-app/html-cache?
The package uses Laravel's existing cache stores rather than introducing its own storage layer. That means the backend is configurable through your Laravel cache configuration, but the release notes do not state a recommended store for production. Validate concurrency behavior and invalidation reliability for the store you choose, especially under load.
How do I invalidate the HTML cache when content changes?
The package advertises simple cache invalidation when content changes, but the exact primitives are not documented in the v1.0.52 release note. Plan to hook your content publish or update path into the cache layer so editorial changes do not leave stale pages. Test invalidation on publish, deploy, and permission changes before relying on it.
Is it safe to cache authenticated or personalized Laravel pages?
No, full-page caching is a poor fit for authenticated, personalized, session-driven, CSRF-protected, or signed-URL responses. A misconfigured cache key or an over-broad middleware registration can serve one user's page to another. Keep those routes on a bypass list and verify cross-user leakage behavior explicitly.
How can I test the HTML cache in a Laravel application?
Start with an integration test that requests a cacheable route twice and asserts the second response is served from cache. Include tests for cache invalidation after content changes and for bypass rules on authenticated routes. Also verify that enabling the middleware adds no measurable latency on an uncached or warm path.
What are alternatives to capell-app/html-cache for Laravel full-page caching?
Alternatives include Laravel's own response cache middleware, HTTP reverse proxies such as Varnish or Nginx fastcgi_cache, and CDN edge caching for anonymous marketing pages. The right choice depends on whether you need per-route rules inside Laravel or can cache at the edge. capell-app/html-cache is most relevant when you want a lightweight, middleware-based cache integrated with Laravel cache stores.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect