Registry / web-framework / spatie-laravel-responsecache

spatie-laravel-responsecache

JSON →
library8.4.1phppackagistunverified

Speed up a Laravel application by caching the entire response.

composer require spatie/laravel-responsecache
INSTALL
IMPORT
SIG · SPATIE-LARAVEL-RES
S
spatie-laravel-responsecache
web-frameworkphpv8.4.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CacheResponse
use Spatie\ResponseCache\Middlewares\CacheResponse;

Applies the CacheResponse middleware to cache the entire response of a route.

use Spatie\ResponseCache\Middlewares\CacheResponse; // In routes/web.php: Route::middleware(CacheResponse::class)->group(function () { Route::get('/cached-page', function () { return view('welcome'); }); });
Debug
Known issues
gotchaCache invalidation must be handled manually or via events; cached responses may serve stale data.
fix
Use the provided cache clearing commands or events to invalidate cache when content changes.
affects: >=8.0.0
Upgrade
Version history
8.4.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
spatie-laravel-responsecache — pip install spatie-laravel-responsecache · libregistry