承接 tomhart/laravel-resilient-http-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tomhart/laravel-resilient-http-client

Composer 安装命令:

composer require tomhart/laravel-resilient-http-client

包简介

Laravel Resilient Http Client

README 文档

README

This library allows you to make HTTP requests with built in cache resiliency. The client simply wraps around Guzzle's request method, so it you already use that, this will be very easy to implement into your app.

Usage

use TomHart\HttpClient\Contracts\ResilientClientInterface;

$client = app(ResilientClientInterface::class);

$response = $client->request('GET', '/url');

You can publish the config-file with:

php artisan vendor:publish --provider="TomHart\HttpClient\ResilientServiceProvider" --tag="config"

Caching

This library utilises 2 different caches, one short term cache, and one longer term cache. The short term cache is used every time you call request. If the short term cache is a miss, and the HTTP request fails, it will only then look into the long term cache.

Config Options

Config Item Usage Default
cache_time What TTL (seconds) to use for the short term cache 60
fallback_cache_time What TTL (seconds) to use for the long term cache 3600

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-11-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固