mon-suivi-logement/sellsy-api-v1-cache-strategy
最新稳定版本:v1.0.0
Composer 安装命令:
composer require mon-suivi-logement/sellsy-api-v1-cache-strategy
包简介
A cache strategy for Sellsy Api v1, build on top of Kevinrob Guzzle caceh middleware
关键字:
README 文档
README
Sellsy Api V1 cache strategy for Kevinrob Guzzle cache middleware https://github.com/Kevinrob/guzzle-cache-middleware
Installation
composer require mon-suivi-logement/sellsy-api-v1-cache-strategy
or add it the your composer.json and run composer update.
How?
Example with LaravelCacheStorage :
use GuzzleHttp\Client; use GuzzleHttp\HandlerStack; use Kevinrob\GuzzleCache\CacheMiddleware; use Kevinrob\GuzzleCache\Storage\FlysystemStorage; use Kevinrob\GuzzleCache\Storage\LaravelCacheStorage; use MonSuiviLogement\GuzzleCache\Strategy\SellsyApiV1Strategy; $stack = HandlerStack::create(); $cache_middleware = new CacheMiddleware( new SellsyApiV1Strategy( new LaravelCacheStorage( Cache::store('file') ), 1800, // the TTL in seconds ), ); //Allow POST methods on middleware $cache_middleware->setHttpMethods(['GET' => true, 'POST' => true]); $stack->push($cache_middleware,'sellsy-cache'); $guzzle_client = new Client(["handler" => $stack]); $transport_bridge = new Guzzle6($guzzle_client);
统计信息
- 总下载量: 606
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-28