PHPackages                             remic/guzzlecache - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. remic/guzzlecache

ActiveLibrary[HTTP &amp; Networking](/categories/http)

remic/guzzlecache
=================

Laravel 5 package for caching Guzzle's GET requests.

v0.2(10y ago)189.3k5[1 issues](https://github.com/RemiCollin/GuzzleCache/issues)MITPHPPHP &gt;=5.5

Since Mar 24Pushed 10y ago2 watchersCompare

[ Source](https://github.com/RemiCollin/GuzzleCache)[ Packagist](https://packagist.org/packages/remic/guzzlecache)[ RSS](/packages/remic-guzzlecache/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (4)Used By (0)

\#Guzzle Cache Laravel 5 Package

GuzzleCache is a simple wrapper around the [GuzzleHttp](http://docs.guzzlephp.org/en/latest/) library, aimed at optimizing API consuming applications by intercepting **GET** request and storing/retrieving responses from the Laravel's cache engine.

\##Installation

Grab the package with composer :

```

    composer require remic/guzzlecache:~0.2

```

\##Configuration

The GuzzleCache package works both with Laravel 5 and Lumen, but the configuration process is different.

\###Laravel

In Laravel, you need to register the packages service provider into your config/app.php configuration file :

```
    Remic\GuzzleCache\GuzzleCacheServiceProvider::class,
```

If you're using facades, add this line to the corresponding section in config/app.php :

```
    'GuzzleCache'   => Remic\GuzzleCache\Facades\GuzzleCache::class,
```

GuzzleCache come shipped with a default configuration file, if you wish to override these defaults, you have to publish the configuration file :

```

    artisan vendor:publish

```

\###Lumen

In Lumen, you need to register the package's service provider into the bootstrap/app.php file :

```
    $app->register(Remic\GuzzleCache\GuzzleCacheServiceProvider::class);
```

If you wish to use the GuzzleCache facade, first make sure `$app->withFacades();` is uncommented in `bootstrap/app.php`, then add the following class alias :

```
    class_alias(Remic\GuzzleCache\Facades\GuzzleCache::class, 'GuzzleCache');
```

In Lumen, the configuration is handled via the .env file at the root of the project. Here are the default values used by GuzzleCache. If you wish to modify these, just copy and paste these to your .env file :

```

GUZZLECACHE_LIFETIME=60
GUZZLECACHE_STORE=
GUZZLECACHE_PREFIX=guzzlecache_

```

\##Usage

From your L5 application, call:

```
$client = GuzzleCache::client(['base_url' => 'http://httpbin.org']);

$res = $client->get('/');

echo $res->getStatusCode();
```

Here, the $client object is an instance of Guzzle client. You can refer to [Guzzle Documentation](http://docs.guzzlephp.org/en/latest/) for more details.

\###Specifying a custom lifetime

You can specify an optionnal lifetime when requesting a Guzzle client, that will override the defaults set in GuzzleCache config, for all request made with the object :

```
// Store all the request made with $client for 15 minutes
$client = GuzzleCache::client(['base_url' => 'http://httpbin.org'], 15);
```

\##License

MIT

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~157 days

Total

3

Last Release

3804d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f17700a18f8fa81ea5bef95c082b75fd42afe88d47c4cedc64f23771fece27f6?d=identicon)[RemiCollin](/maintainers/RemiCollin)

---

Top Contributors

[![RemiCollin](https://avatars.githubusercontent.com/u/9589616?v=4)](https://github.com/RemiCollin "RemiCollin (15 commits)")

---

Tags

httpapiproxyGuzzlelumencachelaravel5

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/remic-guzzlecache/health.svg)

```
[![Health](https://phpackages.com/badges/remic-guzzlecache/health.svg)](https://phpackages.com/packages/remic-guzzlecache)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
