PHPackages                             flc/laravel-middleware-cache-response - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. flc/laravel-middleware-cache-response

ActiveLibrary[Caching](/categories/caching)

flc/laravel-middleware-cache-response
=====================================

Laravel中间件-Response缓存

v1.1(6y ago)608.2k↓100%14[1 issues](https://github.com/flc1125/laravel-middleware-cache-response/issues)MITPHPPHP &gt;=5.4.0

Since Mar 29Pushed 1y ago2 watchersCompare

[ Source](https://github.com/flc1125/laravel-middleware-cache-response)[ Packagist](https://packagist.org/packages/flc/laravel-middleware-cache-response)[ RSS](/packages/flc-laravel-middleware-cache-response/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Laravel中间件-Response缓存
=====================

[](#laravel中间件-response缓存)

[![Latest Stable Version](https://camo.githubusercontent.com/a59722bd30d565068ec8ad40681290faba01b09d7d3d8f715e18f47659be052b/68747470733a2f2f706f7365722e707567782e6f72672f666c632f6c61726176656c2d6d6964646c65776172652d63616368652d726573706f6e73652f762f737461626c65)](https://packagist.org/packages/flc/laravel-middleware-cache-response)[![Total Downloads](https://camo.githubusercontent.com/e7bb4caeed6d66633070bb024ec77e0df6acd3c1d8fe26634180f1f455e0b49d/68747470733a2f2f706f7365722e707567782e6f72672f666c632f6c61726176656c2d6d6964646c65776172652d63616368652d726573706f6e73652f646f776e6c6f616473)](https://packagist.org/packages/flc/laravel-middleware-cache-response)[![License](https://camo.githubusercontent.com/c8306a31c9f1a7704dc484a76922e610ea05a8100be46025e2d8161c068d3b8b/68747470733a2f2f706f7365722e707567782e6f72672f666c632f6c61726176656c2d6d6964646c65776172652d63616368652d726573706f6e73652f6c6963656e7365)](https://packagist.org/packages/flc/laravel-middleware-cache-response)[![996.icu](https://camo.githubusercontent.com/ac8f294a80f65338db545230f1a881b9a382204a1f187c6ff40ee679d42d40ca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c696e6b2d3939362e6963752d7265642e737667)](https://996.icu)[![LICENSE](https://camo.githubusercontent.com/be80b8cb211ceb2263744e99fdb161a40124901906fd7c7f47d6361760dd7e8b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d416e74692532303939362d626c75652e737667)](https://github.com/996icu/996.ICU/blob/master/LICENSE)

功能
--

[](#功能)

- 支持缓存渲染后数据
- 支持指定缓存过期时间（默认10分钟）
- header头输出缓存命中状态、缓存Key及过期时间

安装
--

[](#安装)

```
composer require flc/laravel-middleware-cache-response
```

配置
--

[](#配置)

> `\app\Http\Kernel.php`文件中`$routeMiddleware`增加：

```
