mintbridge/laravel-cache-filter
Composer 安装命令:
composer require mintbridge/laravel-cache-filter
包简介
Laravel route filter for caching responses
README 文档
README
Often you have responses that don't change very often, this package lets you store these responses in the cache and then return them automatically using a filter the next time they are requested.
Installation
Begin by installing this package through Composer.
{
"require": {
"mintbridge/laravel-cache-filter": "1.0.x"
}
}
Then add the service provider to you app config.
// app/config/app.php 'providers' => [ '...', 'MintBridge\LaravelCacheFilter\LaravelCacheFilterServiceProvider' ];
Usage
The package provide 2 filters, these can be used with Laravels before and after route filters:
Route::get('some-route', array( 'before' => 'cache.response.fetch', 'after' => 'cache.response.store', ... ));
The fetch filter will check to see if the response has been cached and if so return it. The store filter takes the generated response and adds it to the cache ready for the next time it is requested.
统计信息
- 总下载量: 22
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-06-15