PHPackages                             emanueleminotto/guzzle-cache-subscriber - 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. emanueleminotto/guzzle-cache-subscriber

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

emanueleminotto/guzzle-cache-subscriber
=======================================

Server side caching for Guzzle 4/5

1.0.0(11y ago)11.5k[1 issues](https://github.com/EmanueleMinotto/guzzle-cache-subscriber/issues)MITPHP

Since Feb 27Pushed 10y ago1 watchersCompare

[ Source](https://github.com/EmanueleMinotto/guzzle-cache-subscriber)[ Packagist](https://packagist.org/packages/emanueleminotto/guzzle-cache-subscriber)[ RSS](/packages/emanueleminotto-guzzle-cache-subscriber/feed)WikiDiscussions master Synced 1mo ago

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

Guzzle Cache Subscriber
=======================

[](#guzzle-cache-subscriber)

[![Build Status](https://camo.githubusercontent.com/e65de58eb6540d50358b7982a4469ebc8f60a0d6618673ada57701f5424b5a01/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f456d616e75656c654d696e6f74746f2f67757a7a6c652d63616368652d737562736372696265722e7376673f7374796c653d666c6174)](https://travis-ci.org/EmanueleMinotto/guzzle-cache-subscriber)[![SensioLabs Insight](https://camo.githubusercontent.com/9a8b7cfde3d69142b121b431dc7d13a0a7660533efdc8d199914172f5bd27f66/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f38326537326130332d666335662d343533372d386539302d6333306463363433303762392e7376673f7374796c653d666c6174)](https://insight.sensiolabs.com/projects/82e72a03-fc5f-4537-8e90-c30dc64307b9)[![Coverage Status](https://camo.githubusercontent.com/c33cfe9a99f5763d9521b88ad0c31a1cd46a58fd49fe06cf47ab7829963fd9a6/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f456d616e75656c654d696e6f74746f2f67757a7a6c652d63616368652d737562736372696265722e7376673f7374796c653d666c6174)](https://coveralls.io/r/EmanueleMinotto/guzzle-cache-subscriber)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a1df7dd3d3e2478c22733030772cd23c54be51b50b69a767309e15c84f0c4a89/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f456d616e75656c654d696e6f74746f2f67757a7a6c652d63616368652d737562736372696265722e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/EmanueleMinotto/guzzle-cache-subscriber/)[![Total Downloads](https://camo.githubusercontent.com/41b7d3f14b6b51786f1287a4fac5749aca5b28ea11c158082e503f62dd617b2b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656d616e75656c656d696e6f74746f2f67757a7a6c652d63616368652d737562736372696265722e7376673f7374796c653d666c6174)](https://packagist.org/packages/emanueleminotto/guzzle-cache-subscriber)

Server side caching (based on [doctrine/cache](http://doctrine-orm.readthedocs.org/en/latest/reference/caching.html)) for [Guzzle 4/5](http://docs.guzzlephp.org/en/latest/).

Server side caching helps to improve performances intercepting cached requests before these are sent to the URL (save network usage), and caching (when possible and permitted) responses.

API: [emanueleminotto.github.io/guzzle-cache-subscriber](http://emanueleminotto.github.io/guzzle-cache-subscriber/)

Install
-------

[](#install)

Install the CacheSubscriber adding `emanueleminotto/guzzle-cache-subscriber` to your composer.json or from CLI:

```
$ composer require emanueleminotto/guzzle-cache-subscriber

```

Usage
-----

[](#usage)

```
use GuzzleHttp\Client;
use EmanueleMinotto\Guzzle\CacheSubscriber;

$client = new Client();

$subscriber = new CacheSubscriber(/* Doctrine cache instance, optional */);
// there are the getCache and setCache methods to
// change the storage system

$client->getEmitter()->attach($subscriber);

// request sent
$client->get('http://httpbin.org');

// request intercepted
$client->get('http://httpbin.org');
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Unknown

Total

1

Last Release

4092d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/30b6fbd038f22a54716027eb7ce30c6cafd8e59c138ae58b3c2516c34ccfef7f?d=identicon)[EmanueleMinotto](/maintainers/EmanueleMinotto)

---

Top Contributors

[![EmanueleMinotto](https://avatars.githubusercontent.com/u/417201?v=4)](https://github.com/EmanueleMinotto "EmanueleMinotto (8 commits)")

---

Tags

Guzzlecachesubscriber

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/emanueleminotto-guzzle-cache-subscriber/health.svg)

```
[![Health](https://phpackages.com/badges/emanueleminotto-guzzle-cache-subscriber/health.svg)](https://phpackages.com/packages/emanueleminotto-guzzle-cache-subscriber)
```

###  Alternatives

[kevinrob/guzzle-cache-middleware

A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)

43117.4M104](/packages/kevinrob-guzzle-cache-middleware)[caseyamcl/guzzle_retry_middleware

Guzzle v6+ retry middleware that handles 429/503 status codes and connection timeouts

21610.7M64](/packages/caseyamcl-guzzle-retry-middleware)[php-http/guzzle7-adapter

Guzzle 7 HTTP Adapter

9057.1M555](/packages/php-http-guzzle7-adapter)[graham-campbell/guzzle-factory

Provides A Simple Guzzle Factory With Good Defaults

916.4M49](/packages/graham-campbell-guzzle-factory)[hamburgscleanest/guzzle-advanced-throttle

A Guzzle middleware that can throttle requests according to (multiple) defined rules. It is also possible to define a caching strategy, e.g. get response from cache when rate limit is exceeded or always get cached value to spare your rate limits.

13033.4k1](/packages/hamburgscleanest-guzzle-advanced-throttle)[rtheunissen/guzzle-cache-handler

Guzzle 6/7 handler used to cache responses

12142.8k](/packages/rtheunissen-guzzle-cache-handler)

PHPackages © 2026

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