NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #1325 most downloaded on Packagist
Speed up a Laravel application by caching the entire response
Last release 9 days ago
29 Sep 2026
Release timing varies
gaps range from 2 weeks to 6 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
91 releases · first in 2015
Bump to Double v1 by @jasonmccreary in #533
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.4.4...8.4.5
Convert Mockery to Double by @jasonmccreary in #528
Full Changelog: 8.4.3...8.4.4
One column per quarter.
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.4.3...8.4.4
Read cache attributes from invokable controllers registered without a method by @freekmurze in #527
Full Changelog: 8.4.2...8.4.3
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.4.2...8.4.3
Bump actions/checkout from 6 to 7 by @dependabot [bot] in #522
Full Changelog: 8.4.1...8.4.2
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.4.1...8.4.2
Fix forgetting multiple urls stopping at the first uncached url by @freekmurze in #521
Full Changelog: 8.4.0...8.4.1
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.4.0...8.4.1
Bump dependabot/fetch-metadata from 3.0.0 to 3.1.0 by @dependabot [bot] in #519
Full Changelog: 8.3.1...8.4.0
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.3.1...8.4.0
Fix state sharing in CacheResponse middleware between handle() and terminate() when the middleware is not resolved as the same instance. State now tra
CacheResponse middleware between handle() and terminate() when the middleware is not resolved as the same instance. State now travels on the request attributes. (#518)Fix: defer cache storage to terminate() to include post-response modifications by @eguiluz in #513
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.2.0...8.3.0
Add Laravel 13 and PHP 8.5 support by @freekmurze in #511
Full Changelog: 8.1.0...8.2.0
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.1.0...8.2.0
What's Changed Add Laravel 13 support
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.0.0...8.1.0
For pages where brief staleness is acceptable, you can now use flexible caching. After the lifetime expires, the stale response is still served instan
For pages where brief staleness is acceptable, you can now use flexible caching. After the lifetime expires, the stale response is still served instantly while the cache refreshes in the background. Once the grace period is over, the cache is considered expired and the next request will be fully recalculated:
use Spatie\ResponseCache\Middlewares\FlexibleCacheResponse;
Route::get('/dashboard', [DashboardController::class, 'index'])
->middleware(FlexibleCacheResponse::for(lifetime: hours(1), grace: minutes(5)));You can now use attributes on controllers instead of middleware parameters:
use Spatie\ResponseCache\Attributes\Cache;
use Spatie\ResponseCache\Attributes\FlexibleCache;
use Spatie\ResponseCache\Attributes\NoCache;
#[Cache(lifetime: 3600, tags: ['dashboard'])]
public function index() { ... }
#[FlexibleCache(lifetime: 3600, grace: 300)]
public function show() { ... }
#[NoCache]
public function admin() { ... }Event suffix (e.g. CacheMissed → CacheMissedEvent)cacheRequestUntil() with cacheLifetimeInSeconds() in CacheProfile interfaceCacheResponse::using() with CacheResponse::for() and FlexibleCacheResponse::for()clear() and forget()Full Changelog: 7.7.2...8.0.0
FlexibleCacheResponse middleware — serves stale responses instantly while refreshing the cache in the background#[Cache], #[FlexibleCache], #[NoCache]) for controller-level cache configurationEvent suffix (e.g. CacheMissed → CacheMissedEvent)cacheRequestUntil() with cacheLifetimeInSeconds() in CacheProfile interfaceCacheResponse::using() with CacheResponse::for() and FlexibleCacheResponse::for()Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.7.2...8.0.0
Fix Carbon3 diffInSeconds to use int and not float by @it-can in #500
Full Changelog: 7.7.1...7.7.2
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.7.1...7.7.2
Introduce using() method to conveniently define lifetime and tags by @kamilkozak in https://github.com/spatie/laravel-responsecache/pull/491
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.7.0...7.7.1
Bump stefanzweifel/git-auto-commit-action from 5.1.0 to 5.2.0 by @dependabot in https://github.com/spatie/laravel-responsecache/pull/493
ClearingResponseCacheFailed and return boolean by clear() by @alies-dev in https://github.com/spatie/laravel-responsecache/pull/495Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.5...7.7.0
fix DocBlock in ResponseCache Facade by @ricventu in https://github.com/spatie/laravel-responsecache/pull/492
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.4...7.6.5
Bump stefanzweifel/git-auto-commit-action from 5.0.1 to 5.1.0 by @dependabot in https://github.com/spatie/laravel-responsecache/pull/487
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.3...7.6.4
Fix ResponseCache Facade docblock for forget() by @alexcanana in https://github.com/spatie/laravel-responsecache/pull/486
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.2...7.6.3
CsrfTokenReplacer avoid str_replace(): by @thyseus in https://github.com/spatie/laravel-responsecache/pull/482
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.1...7.6.2
Add PHPDoc for ResponseCache Facade by @alies-dev in https://github.com/spatie/laravel-responsecache/pull/485
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.0...7.6.1
Bump stefanzweifel/git-auto-commit-action from 5.0.0 to 5.0.1 by @dependabot in https://github.com/spatie/laravel-responsecache/pull/470
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.5.2...7.6.0
Cast cache lifetime to integer by default by @dwightwatson in https://github.com/spatie/laravel-responsecache/pull/468
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.5.1...7.5.2
- allow Carbon 3 Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.5.0...7.5.1
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.5.0...7.5.1
Add php 8.3 matrix by @binbyz in https://github.com/spatie/laravel-responsecache/pull/460
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.10...7.5.0
Bump actions/checkout from 3 to 4 by @dependabot in https://github.com/spatie/laravel-responsecache/pull/449
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.9...7.4.10
- Fix docblock
Change PHPDoc for method clear(array ) in Facade by @kra-so in https://github.com/spatie/laravel-responsecache/pull/451
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.7...7.4.8
Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in https://github.com/spatie/laravel-responsecache/pull/427
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.6...7.4.7
- add support for L10
Bump stefanzweifel/git-auto-commit-action from 4.15.4 to 4.16.0 by @dependabot in https://github.com/spatie/laravel-responsecache/pull/424
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.4...7.4.5
Refactor tests to pest by @AyoobMH in https://github.com/spatie/laravel-responsecache/pull/418
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.3...7.4.4
Dispatch clear events when using facade by @mateusjunges in https://github.com/spatie/laravel-responsecache/pull/413
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.2...7.4.3
Always prepend app url to requests by @apeisa in https://github.com/spatie/laravel-responsecache/pull/409
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.1...7.4.2
Cache bypass header now also prevents an already cached response from being returned by @fgilio in https://github.com/spatie/laravel-responsecache/pul
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.0...7.4.1
Add cache bypass header by @fgilio in https://github.com/spatie/laravel-responsecache/pull/406
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.3.1...7.4.0
Handle missed cache gracefully by @antennaio in https://github.com/spatie/laravel-responsecache/pull/383
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.3.0...7.3.1
Nothing published for this version
- support Laravel 9
- add CacheItemSelector
CacheItemSelector- add url option to ClearCommand
url option to ClearCommand (#348)use PHP 8 syntax where possible
- fix for issue #331
- use package service provider
- add support for PHP 8
- fix tagged responsecache:clear
- Support Laravel 8
replace Laravel/framework with individual packages
support JSON types other than application/json
change to the proper way of setting app URL on runtime
drop support for Laravel 6 to fix the test suite (namespace of TestResponse has changed)
TestResponse has changed)- add support for Laravel 7
drop support for all non-current PHP and Laravel versions
add support for custom serializers
make compatible with Laravel 7, so the package can be used on PHP 7.3
- make compatible with Laravel 6
restore laravel 5.7 compatibility
- add support for cache tags
- make json responses cacheable
use Rfc2822S formatted date in cache time header
removed deprecated Flush command
RequestHasher in favor of a custom oneCacheAllSuccessfulGetRequests will only cache responses of which the content type starts with textFlush command\Spatie\ResponseCache\ResponseCacheFacade has been removedmake sure the request starts with the app url - fixes #177
Your coding agent can read these notes before it upgrades. Set up the MCP server →