optimistdigital/laravel-set-cache-headers
Composer 安装命令:
composer require optimistdigital/laravel-set-cache-headers
包简介
This Laravel package is a bug fix for not caching successful responses, especially the ones with the HTTP status code 204 (No Content).
README 文档
README
This Laravel package is a bug fix for not caching successful responses, especially the ones with the HTTP status code 204 (No Content).
See issue: laravel/framework#32178
Requirements
- Laravel 6.0+, probably works with older ones as well
Usage
composer require optimistdigital/laravel-set-cache-headers
Swap out SetCacheHeaders middleware in app/Http/Kernel.php in your Laravel application:
Before:
protected $routeMiddleware = [
// ...
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
// ...
];
After
protected $routeMiddleware = [
// ...
'cache.headers' => \OptimistDigital\SetCacheHeaders\Http\Middleware\SetCacheHeaders::class,
// ...
];
统计信息
- 总下载量: 177
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-04-01