All notable changes to laravel-responsecache will be documented in this file.
- Add Laravel 13 and PHP 8.5 support by @freekmurze in spatie#511
- Use spatie/php-attribute-reader by @freekmurze in spatie#512
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/8.1.0...8.2.0
- 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
- 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
FlexibleCacheResponsemiddleware — 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
Eventsuffix (e.g.CacheMissed→CacheMissedEvent) - Replace
cacheRequestUntil()withcacheLifetimeInSeconds()inCacheProfileinterface - Replace
CacheResponse::using()withCacheResponse::for()andFlexibleCacheResponse::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
- Fix Carbon3 diffInSeconds to use int and not float by @it-can in spatie#500
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in spatie#498
- Bump stefanzweifel/git-auto-commit-action from 5.2.0 to 6.0.1 by @dependabot[bot] in spatie#496
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 spatie#491
- @kamilkozak made their first contribution in spatie#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 spatie#493
- Bump dependabot/fetch-metadata from 2.3.0 to 2.4.0 by @dependabot in spatie#494
- [8.0] Introduce
ClearingResponseCacheFailedand return boolean byclear()by @alies-dev in spatie#495
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.5...7.7.0
- fix DocBlock in ResponseCache Facade by @ricventu in spatie#492
- @ricventu made their first contribution in spatie#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 spatie#487
- Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0 by @dependabot in spatie#488
- Add compatibility for Laravel 12. by @mazedlx in spatie#490
- @mazedlx made their first contribution in spatie#490
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.3...7.6.4
- Fix ResponseCache Facade docblock for forget() by @alexcanana in spatie#486
- @alexcanana made their first contribution in spatie#486
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.6.2...7.6.3
- CsrfTokenReplacer avoid str_replace(): by @thyseus in spatie#482
- @thyseus made their first contribution in spatie#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 spatie#485
- @alies-dev made their first contribution in spatie#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 spatie#470
- Fix incorrect grammar by @SebKay in spatie#472
- Add missing Laravel 11.x Documentation by @omaratpxt in spatie#474
- Bump dependabot/fetch-metadata from 1.6.0 to 2.2.0 by @dependabot in spatie#475
- Switch DefaultHasher to xxh128 for a faster alternative to MD5. by @marcell-ferenc in spatie#478
- @SebKay made their first contribution in spatie#472
- @omaratpxt made their first contribution in spatie#474
- @marcell-ferenc made their first contribution in spatie#478
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 spatie#468
- @dwightwatson made their first contribution in spatie#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
- Add php 8.3 matrix by @binbyz in spatie#460
- Support Laravel 11
- @binbyz made their first contribution in spatie#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 spatie#449
- Bump stefanzweifel/git-auto-commit-action from 4.16.0 to 5.0.0 by @dependabot in spatie#452
- Do not enable cache time header by default by @francoism90 in spatie#456
- @francoism90 made their first contribution in spatie#456
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 spatie#451
- @gomzyakov made their first contribution in spatie#437
- @kra-so made their first contribution in spatie#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 spatie#427
- Property name changed by @Fot0n in spatie#428
- Typo fix in config responsecache by @dorqa95 in spatie#431
- Issue #342: CacheResponse race condition with has and get by @swichers in spatie#434
- @Fot0n made their first contribution in spatie#428
- @dorqa95 made their first contribution in spatie#431
- @swichers made their first contribution in spatie#434
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 spatie#424
- Normalize query string parameters before hashing by @cosmastech in spatie#426
- @cosmastech made their first contribution in spatie#426
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.4...7.4.5
- Refactor tests to pest by @AyoobMH in spatie#418
- Add PHP 8.2 Support to tests workflow by @patinthehat in spatie#421
- Add Dependabot Automation by @patinthehat in spatie#420
- Bump actions/checkout from 2 to 3 by @dependabot in spatie#423
- Bump stefanzweifel/git-auto-commit-action from 2.3.0 to 4.15.4 by @dependabot in spatie#422
- Catch CouldNotUnserialize exception and continue returning a response by @roberttolton in spatie#408
- @AyoobMH made their first contribution in spatie#418
- @dependabot made their first contribution in spatie#423
- @roberttolton made their first contribution in spatie#408
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.3...7.4.4
- Dispatch clear events when using facade by @mateusjunges in spatie#413
- @mateusjunges made their first contribution in spatie#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 spatie#409
- @apeisa made their first contribution in spatie#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 spatie#407
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.4.0...7.4.1
- Add cache bypass header by @fgilio in spatie#406
- @fgilio made their first contribution in spatie#406
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.3.1...7.4.0
- Handle missed cache gracefully by @antennaio in spatie#383
- @antennaio made their first contribution in spatie#383
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.3.0...7.3.1
- Add option to output cache age header by @it-can in spatie#385
- @it-can made their first contribution in spatie#385
Full Changelog: https://github.com/spatie/laravel-responsecache/compare/7.2.0...7.3.0
- support Laravel 9
- add
CacheItemSelector
- add
urloption toClearCommand(#348)
- require PHP 8+
- drop support for PHP 7.x
- use PHP 8 syntax where possible
- fix for issue #331 (#344)
- use package service provider
- add support for PHP 8
- fix clearing tagged cache
- fix tagged responsecache:clear (#316)
- Support Laravel 8
- replace Laravel/framework with individual packages (#304)
- support JSON types other than application/json (#299)
- change to the proper way of setting app URL on runtime (#290)
- drop support for Laravel 6 to fix the test suite (namespace of
TestResponsehas 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
- added support for replacers
- you can now swap out
RequestHasherin favor of a custom one CacheAllSuccessfulGetRequestswill only cache responses of which the content type starts withtext- removed deprecated
Flushcommand \Spatie\ResponseCache\ResponseCacheFacadehas been removed- dropped support for carbon v1
- dropped support for PHP 7.2
- make sure the request starts with the app url - fixes #177
- make host specific caches
- fix cache lifetime in config file
- drop support for Laravel 5.7 and lower
- drop support for PHP 7.0 and lower
- change all cache time parameters to seconds (see UPGRADING.md)
- add support for Laravel 5.8
- you can no longer add multiple
CacheResponsemiddleware to one route
- fix for caching urls with query parameters
- fix for forgetting a specific url
- add support for Laravel 5.7
- fix for issue #123
- add support for Lumen
- add
forget
- add support for L5.6
- Added:
clear()method andresponsecache:clearcommand - Deprecated:
flush()method andresponsecache:flushcommand
Deprecated features will still work until the next major version.
- Added: Better exception handling when something goes wrong unserializing the response
- Added: Support for specific lifetimes on routes
- Fixed: Artisan command registration
- Added: Support for Laravel 5.5
- Removed: Support for all older Laravel versions
- Changed: Renamed facade class
- Added: Support for
BinaryFileResponse
- Added: Support for taggable cache
- Fixed: Php version dependency in
composer.json
- Added:
enabledmethod on cache profiles - Added: Events
- Changed: Middleware won't automatically be registered anymore
- Changed: Renamed config file
- Changed: Renamed various methods for readability
- Removed: Dropped PHP 5.6 support
- Added: Support for Laravel 5.4
- Removed: Dropped support for all older Laravel versions
- Added: Usage of
RESPONSE_CACHE_LIFETIMEenv var to config file
- Changed: Debug headers will not be sent when
APP_DEBUGis set to false
- Fixed: Issue where the cache middleware couldn't correctly determine the currently authenticated user
- Fixed: An issue where cached request were still served even if the package was disabled via the config file
- Fixed: An issue where the cache header could not be set
- Fixed: BaseCacheProfile has been made abstract (as it should have been all along)
- Fixed: Default cachetime
- Added: A command to flush the response cache
- Initial release