PackageTrack
Sign in Get early access

spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

8.4.3 9.5M downloads/mo #1369 most downloaded on Packagist spatie/laravel-responsecache

What this package is like to depend on

Last release 16 days ago

07 Aug 2026

Release timing varies

gaps range from 2 weeks to 6 months

Nearly every release is documented

notes for 87 of 89 stable releases

Nothing withdrawn

no release was ever pulled

11 years old

89 releases · first in 2015

9 releases in the last 12 months

see the full history below

Release timeline

89 releases · Jul 2015 to Aug 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 89
  1. 8.4.3 07 Aug 2026
    Release notes

    What's Changed

    • Read cache attributes from invokable controllers registered without a method by @freekmurze in #527

    Full Changelog: 8.4.2...8.4.3

    Open source →
    Release notes

    What's Changed

    • Read cache attributes from invokable controllers registered without a method by @freekmurze in https://github.com/spatie/laravel-responsecache/pull/527

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.4.2...8.4.3

    Open source →
  2. 8.4.2 07 Aug 2026
    Release notes

    What's Changed

    • Bump actions/checkout from 6 to 7 by @dependabot[bot] in #522
    • Remove obsolete Laravel 11 skips from event dispatch tests by @nikosv in #526
    • Fix flexible cache expiring after grace instead of lifetime + grace by @nikosv in #525

    New Contributors

    Full Changelog: 8.4.1...8.4.2

    Open source →
    Release notes

    What's Changed

    • Bump actions/checkout from 6 to 7 by @dependabot[bot] in https://github.com/spatie/laravel-responsecache/pull/522
    • Remove obsolete Laravel 11 skips from event dispatch tests by @nikosv in https://github.com/spatie/laravel-responsecache/pull/526
    • Fix flexible cache expiring after grace instead of lifetime + grace by @nikosv in https://github.com/spatie/laravel-responsecache/pull/525

    New Contributors

    • @nikosv made their first contribution in https://github.com/spatie/laravel-responsecache/pull/526

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.4.1...8.4.2

    Open source →
  3. 8.4.1 25 May 2026
    Release notes

    What's Changed

    • Fix forgetting multiple urls stopping at the first uncached url by @freekmurze in #521

    Full Changelog: 8.4.0...8.4.1

    Open source →
    Release notes

    What's Changed

    • Fix forgetting multiple urls stopping at the first uncached url by @freekmurze in https://github.com/spatie/laravel-responsecache/pull/521

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.4.0...8.4.1

    Open source →
  4. 8.4.0 11 May 2026
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 8.3.1...8.4.0

    Open source →
    Release notes

    What's Changed

    • Bump dependabot/fetch-metadata from 3.0.0 to 3.1.0 by @dependabot[bot] in https://github.com/spatie/laravel-responsecache/pull/519
    • Treat null cache value as a miss to fix has/get race by @mattiasgeniar in https://github.com/spatie/laravel-responsecache/pull/520

    New Contributors

    • @mattiasgeniar made their first contribution in https://github.com/spatie/laravel-responsecache/pull/520

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.3.1...8.4.0

    Open source →
  5. 8.3.1 15 Apr 2026
    Release notes
    • Fix state sharing in CacheResponse middleware between handle() and terminate() when the middleware is not resolved as the same instance. State now travels on the request attributes. (#518)
    Open source →
    Release notes
    • Fix state sharing in CacheResponse middleware between handle() and terminate() when the middleware is not resolved as the same instance. State now travels on the request attributes. (#518)
    Open source →
  6. 8.3.0 03 Mar 2026
    Release notes

    What's Changed

    • Fix: defer cache storage to terminate() to include post-response modifications by @eguiluz in #513

    New Contributors

    Full Changelog: 8.2.0...8.3.0

    Open source →
    Release notes

    What's Changed

    • Fix: defer cache storage to terminate() to include post-response modifications by @eguiluz in https://github.com/spatie/laravel-responsecache/pull/513

    New Contributors

    • @eguiluz made their first contribution in https://github.com/spatie/laravel-responsecache/pull/513

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.2.0...8.3.0

    Open source →
  7. 8.2.0 22 Feb 2026
    Release notes

    What's Changed

    Full Changelog: 8.1.0...8.2.0

    Open source →
    Release notes

    What's Changed

    • Add Laravel 13 and PHP 8.5 support by @freekmurze in https://github.com/spatie/laravel-responsecache/pull/511
    • Use spatie/php-attribute-reader by @freekmurze in https://github.com/spatie/laravel-responsecache/pull/512

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.1.0...8.2.0

    Open source →
  8. 8.1.0 16 Feb 2026
    Release notes

    What's Changed

    • Add Laravel 13 support
    Open source →
    Release notes

    What's Changed

    • Switch SVG diagrams to light theme for readable text on docs
    • Add responsecache development skill

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.0.0...8.1.0

    Open source →
  9. 8.0.0 16 Feb 2026
    Release notes

    What's new

    Flexible caching

    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)));

    PHP attributes for cache configuration

    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() { ... }

    Other changes

    • Add support for PHP 8.4 and Laravel 12
    • Drop support for PHP 8.3 and below, Laravel 11 and below
    • Rename event classes to use Event suffix (e.g. CacheMissedCacheMissedEvent)
    • Replace cacheRequestUntil() with cacheLifetimeInSeconds() in CacheProfile interface
    • Replace CacheResponse::using() with CacheResponse::for() and FlexibleCacheResponse::for()
    • Improved debug headers configuration
    • Fix return types in Facade PHPDoc for clear() and forget()

    Full Changelog: 7.7.2...8.0.0

    Open source →
    Release notes

    What's Changed

    • Add support for PHP 8.4 and Laravel 12
    • Drop support for PHP 8.3 and below
    • Drop support for Laravel 11 and below
    • Add flexible caching via FlexibleCacheResponse middleware — serves stale responses instantly while refreshing the cache in the background
    • Add PHP attributes (#[Cache], #[FlexibleCache], #[NoCache]) for controller-level cache configuration
    • Rename event classes to use Event suffix (e.g. CacheMissedCacheMissedEvent)
    • Replace cacheRequestUntil() with cacheLifetimeInSeconds() in CacheProfile interface
    • Replace CacheResponse::using() with CacheResponse::for() and FlexibleCacheResponse::for()
    • Improved debug headers configuration
    • Fix return types in Facade PHPDoc for clear() and forget()

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.7.2...8.0.0

    Open source →
  10. 7.7.2 28 Aug 2025
    Release notes

    What's Changed

    • Fix Carbon3 diffInSeconds to use int and not float by @it-can in #500
    • Bump actions/checkout from 4 to 5 by @dependabot[bot] in #498
    • Bump stefanzweifel/git-auto-commit-action from 5.2.0 to 6.0.1 by @dependabot[bot] in #496

    Full Changelog: 7.7.1...7.7.2

    Open source →
    Release notes

    What's Changed

    • Fix Carbon3 diffInSeconds to use int and not float by @it-can in https://github.com/spatie/laravel-responsecache/pull/500
    • Bump actions/checkout from 4 to 5 by @dependabot[bot] in https://github.com/spatie/laravel-responsecache/pull/498
    • Bump stefanzweifel/git-auto-commit-action from 5.2.0 to 6.0.1 by @dependabot[bot] in https://github.com/spatie/laravel-responsecache/pull/496

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.7.1...7.7.2

    Open source →
  11. 7.7.1 17 Jul 2025
    Release notes

    What's Changed

    • Introduce using() method to conveniently define lifetime and tags by @kamilkozak in https://github.com/spatie/laravel-responsecache/pull/491

    New Contributors

    • @kamilkozak made their first contribution in https://github.com/spatie/laravel-responsecache/pull/491

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.7.0...7.7.1

    Open source →
  12. 7.7.0 20 May 2025
    Release notes

    What's Changed

    • 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
    • Bump dependabot/fetch-metadata from 2.3.0 to 2.4.0 by @dependabot in https://github.com/spatie/laravel-responsecache/pull/494
    • [8.0] Introduce ClearingResponseCacheFailed and return boolean by clear() by @alies-dev in https://github.com/spatie/laravel-responsecache/pull/495

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.5...7.7.0

    Open source →
  13. 7.6.5 10 Apr 2025
    Release notes

    What's Changed

    • fix DocBlock in ResponseCache Facade by @ricventu in https://github.com/spatie/laravel-responsecache/pull/492

    New Contributors

    • @ricventu made their first contribution in https://github.com/spatie/laravel-responsecache/pull/492

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.4...7.6.5

    Open source →
  14. 7.6.4 25 Feb 2025
    Release notes

    What's Changed

    • 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
    • Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0 by @dependabot in https://github.com/spatie/laravel-responsecache/pull/488
    • Add compatibility for Laravel 12. by @mazedlx in https://github.com/spatie/laravel-responsecache/pull/490

    New Contributors

    • @mazedlx made their first contribution in https://github.com/spatie/laravel-responsecache/pull/490

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.3...7.6.4

    Open source →
  15. 7.6.3 11 Dec 2024
    Release notes

    What's Changed

    • Fix ResponseCache Facade docblock for forget() by @alexcanana in https://github.com/spatie/laravel-responsecache/pull/486

    New Contributors

    • @alexcanana made their first contribution in https://github.com/spatie/laravel-responsecache/pull/486

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.2...7.6.3

    Open source →
  16. 7.6.2 09 Dec 2024
    Release notes

    What's Changed

    • CsrfTokenReplacer avoid str_replace(): by @thyseus in https://github.com/spatie/laravel-responsecache/pull/482

    New Contributors

    • @thyseus made their first contribution in https://github.com/spatie/laravel-responsecache/pull/482

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.1...7.6.2

    Open source →
  17. 7.6.1 18 Nov 2024
    Release notes

    What's Changed

    • Add PHPDoc for ResponseCache Facade by @alies-dev in https://github.com/spatie/laravel-responsecache/pull/485

    New Contributors

    • @alies-dev made their first contribution in https://github.com/spatie/laravel-responsecache/pull/485

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.0...7.6.1

    Open source →
  18. 7.6.0 05 Aug 2024
    Release notes

    What's Changed

    • 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
    • Fix incorrect grammar by @SebKay in https://github.com/spatie/laravel-responsecache/pull/472
    • Add missing Laravel 11.x Documentation by @omaratpxt in https://github.com/spatie/laravel-responsecache/pull/474
    • Bump dependabot/fetch-metadata from 1.6.0 to 2.2.0 by @dependabot in https://github.com/spatie/laravel-responsecache/pull/475
    • Switch DefaultHasher to xxh128 for a faster alternative to MD5. by @marcell-ferenc in https://github.com/spatie/laravel-responsecache/pull/478

    New Contributors

    • @SebKay made their first contribution in https://github.com/spatie/laravel-responsecache/pull/472
    • @omaratpxt made their first contribution in https://github.com/spatie/laravel-responsecache/pull/474
    • @marcell-ferenc made their first contribution in https://github.com/spatie/laravel-responsecache/pull/478

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.5.2...7.6.0

    Open source →
  19. 7.5.2 03 Apr 2024
    Release notes

    What's Changed

    • Cast cache lifetime to integer by default by @dwightwatson in https://github.com/spatie/laravel-responsecache/pull/468

    New Contributors

    • @dwightwatson made their first contribution in https://github.com/spatie/laravel-responsecache/pull/468

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.5.1...7.5.2

    Open source →
  20. 7.5.1 23 Mar 2024
    Release notes
    • allow Carbon 3

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.5.0...7.5.1

    Open source →
  21. 7.5.0 11 Mar 2024
    Release notes

    What's Changed

    • Add php 8.3 matrix by @binbyz in https://github.com/spatie/laravel-responsecache/pull/460
    • Support Laravel 11

    New Contributors

    • @binbyz made their first contribution in https://github.com/spatie/laravel-responsecache/pull/460

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.10...7.5.0

    Open source →
  22. 7.4.10 28 Oct 2023
    Release notes

    What's Changed

    • Bump actions/checkout from 3 to 4 by @dependabot in https://github.com/spatie/laravel-responsecache/pull/449
    • Bump stefanzweifel/git-auto-commit-action from 4.16.0 to 5.0.0 by @dependabot in https://github.com/spatie/laravel-responsecache/pull/452
    • Do not enable cache time header by default by @francoism90 in https://github.com/spatie/laravel-responsecache/pull/456

    New Contributors

    • @francoism90 made their first contribution in https://github.com/spatie/laravel-responsecache/pull/456

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.9...7.4.10

    Open source →
  23. 7.4.9 02 Oct 2023
    Release notes
    • Fix docblock
    Open source →
  24. 7.4.8 27 Sep 2023
    Release notes

    What's Changed

    • Change PHPDoc for method clear(array ) in Facade by @kra-so in https://github.com/spatie/laravel-responsecache/pull/451

    New Contributors

    • @gomzyakov made their first contribution in https://github.com/spatie/laravel-responsecache/pull/437
    • @kra-so made their first contribution in https://github.com/spatie/laravel-responsecache/pull/451

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.7...7.4.8

    Open source →
  25. 7.4.7 07 Apr 2023
    Release notes

    What's Changed

    • Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in https://github.com/spatie/laravel-responsecache/pull/427
    • Property name changed by @Fot0n in https://github.com/spatie/laravel-responsecache/pull/428
    • Typo fix in config responsecache by @dorqa95 in https://github.com/spatie/laravel-responsecache/pull/431
    • Issue #342: CacheResponse race condition with has and get by @swichers in https://github.com/spatie/laravel-responsecache/pull/434

    New Contributors

    • @Fot0n made their first contribution in https://github.com/spatie/laravel-responsecache/pull/428
    • @dorqa95 made their first contribution in https://github.com/spatie/laravel-responsecache/pull/431
    • @swichers made their first contribution in https://github.com/spatie/laravel-responsecache/pull/434

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.6...7.4.7

    Open source →
  26. 7.4.6 23 Jan 2023
    Release notes
    • add support for L10
    Open source →
  27. 7.4.5 23 Jan 2023
    Release notes

    What's Changed

    • 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
    • Normalize query string parameters before hashing by @cosmastech in https://github.com/spatie/laravel-responsecache/pull/426

    New Contributors

    • @cosmastech made their first contribution in https://github.com/spatie/laravel-responsecache/pull/426

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.4...7.4.5

    Open source →
  28. 7.4.4 25 Nov 2022
    Release notes

    What's Changed

    • Refactor tests to pest by @AyoobMH in https://github.com/spatie/laravel-responsecache/pull/418
    • Add PHP 8.2 Support to tests workflow by @patinthehat in https://github.com/spatie/laravel-responsecache/pull/421
    • Add Dependabot Automation by @patinthehat in https://github.com/spatie/laravel-responsecache/pull/420
    • Bump actions/checkout from 2 to 3 by @dependabot in https://github.com/spatie/laravel-responsecache/pull/423
    • Bump stefanzweifel/git-auto-commit-action from 2.3.0 to 4.15.4 by @dependabot in https://github.com/spatie/laravel-responsecache/pull/422
    • Catch CouldNotUnserialize exception and continue returning a response by @roberttolton in https://github.com/spatie/laravel-responsecache/pull/408

    New Contributors

    • @AyoobMH made their first contribution in https://github.com/spatie/laravel-responsecache/pull/418
    • @dependabot made their first contribution in https://github.com/spatie/laravel-responsecache/pull/423
    • @roberttolton made their first contribution in https://github.com/spatie/laravel-responsecache/pull/408

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.3...7.4.4

    Open source →
  29. 7.4.3 24 Sep 2022
    Release notes

    What's Changed

    • Dispatch clear events when using facade by @mateusjunges in https://github.com/spatie/laravel-responsecache/pull/413

    New Contributors

    • @mateusjunges made their first contribution in https://github.com/spatie/laravel-responsecache/pull/413

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.2...7.4.3

    Open source →
  30. 7.4.2 02 Sep 2022
    Release notes

    What's Changed

    • Always prepend app url to requests by @apeisa in https://github.com/spatie/laravel-responsecache/pull/409

    New Contributors

    • @apeisa made their first contribution in https://github.com/spatie/laravel-responsecache/pull/409

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.1...7.4.2

    Open source →
  31. 7.4.1 09 Aug 2022
    Release notes

    What's Changed

    • Cache bypass header now also prevents an already cached response from being returned by @fgilio in https://github.com/spatie/laravel-responsecache/pull/407

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.0...7.4.1

    Open source →
  32. 7.4.0 01 Aug 2022
    Release notes

    What's Changed

    • Add cache bypass header by @fgilio in https://github.com/spatie/laravel-responsecache/pull/406

    New Contributors

    • @fgilio made their first contribution in https://github.com/spatie/laravel-responsecache/pull/406

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.3.1...7.4.0

    Open source →
  33. 7.3.1 30 May 2022
    Release notes

    What's Changed

    • Handle missed cache gracefully by @antennaio in https://github.com/spatie/laravel-responsecache/pull/383

    New Contributors

    • @antennaio made their first contribution in https://github.com/spatie/laravel-responsecache/pull/383

    Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.3.0...7.3.1

    Open source →
  34. 7.3.0 16 May 2022

    Nothing published for this version

  35. 7.2.0 13 Jan 2022
    Release notes
    • support Laravel 9
    Open source →
  36. 7.1.0 27 Apr 2021
    Release notes
    • add CacheItemSelector
    Open source →
  37. 7.0.1 13 Apr 2021
    Release notes
    • add url option to ClearCommand (#348)
    Open source →
  38. 7.0.0 02 Apr 2021
    Release notes
    • require PHP 8+
    • drop support for PHP 7.x
    • use PHP 8 syntax where possible
    Open source →
  39. 6.6.9 30 Mar 2021
    Release notes
    • fix for issue #331 (#344)
    Open source →
  40. 6.6.8 25 Jan 2021
    Release notes
    • use package service provider
    Open source →
  41. 6.6.7 28 Nov 2020
    Release notes
    • add support for PHP 8
    Open source →
  42. 6.6.5 22 Sep 2020
    Release notes
    • fix tagged responsecache:clear (#316)
    Open source →
  43. 6.6.4 09 Sep 2020
    Release notes
    • Support Laravel 8
    Open source →
  44. 6.6.3 22 Aug 2020
    Release notes
    • replace Laravel/framework with individual packages (#304)
    Open source →
  45. 6.6.2 03 Jun 2020
    Release notes
    • support JSON types other than application/json (#299)
    Open source →
  46. 6.6.1 22 Apr 2020
    Release notes
    • change to the proper way of setting app URL on runtime (#290)
    Open source →
  47. 6.6.0 02 Mar 2020
    Release notes
    • drop support for Laravel 6 to fix the test suite (namespace of TestResponse has changed)
    Open source →
  48. 6.5.0 02 Mar 2020
    Release notes
    • add support for Laravel 7
    Open source →
  49. 6.4.0 01 Dec 2019
    Release notes
    • drop support for all non-current PHP and Laravel versions
    Open source →
  50. 6.3.0 02 Sep 2019
    Release notes
    • add support for custom serializers
    Open source →
  51. 6.2.1 06 Mar 2020
    Release notes
    • make compatible with Laravel 7, so the package can be used on PHP 7.3
    Open source →
  52. 6.2.0 02 Sep 2019
    Release notes
    • make compatible with Laravel 6
    Open source →
  53. 6.1.1 07 Aug 2019
    Release notes
    • restore laravel 5.7 compatibility
    Open source →
  54. 6.1.0 01 Aug 2019
    Release notes
    • add support for cache tags
    Open source →
  55. 6.0.2 31 Jul 2019
    Release notes
    • make json responses cacheable
    Open source →
  56. 6.0.1 09 Jul 2019
    Release notes
    • use Rfc2822S formatted date in cache time header
    Open source →
  57. 6.0.0 20 May 2019
    Release notes
    • added support for replacers
    • you can now swap out RequestHasher in favor of a custom one
    • CacheAllSuccessfulGetRequests will only cache responses of which the content type starts with text
    • removed deprecated Flush command
    • \Spatie\ResponseCache\ResponseCacheFacade has been removed
    • dropped support for carbon v1
    • dropped support for PHP 7.2
    Open source →
  58. 5.0.3 10 May 2019
    Release notes
    • make sure the request starts with the app url - fixes #177
    Open source →
  59. 5.0.2 05 Apr 2019
    Release notes
    • make host specific caches
    Open source →
  60. 5.0.1 15 Mar 2019
    Release notes
    • fix cache lifetime in config file
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive