PHPackages                             dozoisch/cachedbuzz - 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. dozoisch/cachedbuzz

ActiveSymfony-bundle[HTTP &amp; Networking](/categories/http)

dozoisch/cachedbuzz
===================

Browser with caching handling over Buzz

1.0(12y ago)0401MITPHPPHP &gt;=5.3.0

Since Sep 21Pushed 12y ago1 watchersCompare

[ Source](https://github.com/dozoisch/CachedBuzzBundle)[ Packagist](https://packagist.org/packages/dozoisch/cachedbuzz)[ Docs](https://github.com/dozoisch/CachedBuzzBundle)[ RSS](/packages/dozoisch-cachedbuzz/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

CachedBuzzBundle
================

[](#cachedbuzzbundle)

This bundle is meant to provide a way to cache request made with the [buzz bundle](https://github.com/kriswallsmith/Buzz). This bundle can be used exactly like [buzz](https://github.com/kriswallsmith/Buzz), the cache is integrated directly. The bundle is under the [MIT license](http://en.wikipedia.org/wiki/MIT_License). For more information see the file called [LICENSE](./LICENSE) in the root of the path.

Installation
------------

[](#installation)

1. Add this to the `composer.json`:

    ```
    {
        "require": {
            "dozoisch/cachedbuzz": "dev-master"
        }
    }
    ```
2. Enable the bundle in `app/AppKernel.php`:

    ```
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Dozoisch\CachedBuzzBundle\DozoischCachedBuzzBundle(),
        );
    }
    ```

Configuration
-------------

[](#configuration)

**No setting is mandatory** as every thing fallback to a default setting or a default implementation provided by the bundle. The default `cache` uses [APC](http://www.php.net/manual/en/book.apc.php). If the module is not available on your web server, the module initialization will fail.

Here is the full configuration *(in yaml)* possible, with the defaults value :

```
dozoisch_cached_buzz:
    http_client:
        timeout: 10
        verify_peer: true
        max_redirects: 5
        ignore_errors: true
    cache: null #takes a string
    validator: null #takes a string
```

In the `http_client` is used to configure the buzz client. The `cache` setting takes a string that should be a class or a service. Same thing for the `validator`.

The `cache` has to implement the class `Dozoisch\CachedBuzzBundle\Cache\CacheInterface`.
The `validator` has to implement the class `Dozoisch\CachedBuzzBundle\Cache\CacheValidatorInterface`.

Running as a Service
--------------------

[](#running-as-a-service)

To run the Cached Buzz Bundle as a service, insert this into your services.yml file:

```
parameters:
  dozoisch.bundle.name: Dozoisch\CachedBuzzBundle

services:
  # The actual service
  dozoisch.buzz.browser:
    class: '%dozoisch.bundle.name%\Browser'
    arguments: ['@dozoisch.buzz.cacher', '@dozoisch.buzz.client.curl']

  # Parametring.
  dozoisch.buzz.client.curl:
    class:  'Buzz\Client\Curl'
    public: false
    calls:
      - [setVerifyPeer, [false]] # this is optional
      - [setTimeout, [100]] # this is optional

  dozoisch.buzz.cacheinterface:
    class: '%dozoisch.bundle.name%\Cache\APCCache'

  dozoisch.buzz.cachevalidator:
    class: '%dozoisch.bundle.name%\Cache\CacheValidator'

  dozoisch.buzz.cacher:
    class: '%dozoisch.bundle.name%\Cacher'
    arguments: ['@dozoisch.buzz.cacheinterface', '@dozoisch.buzz.cachevalidator']
```

*When using it like that it overrides some of the normal bundles setting and thus, the cacher and client parameters for the browser are no longer optional.*

How to use it
-------------

[](#how-to-use-it)

You can now call the browser just as you would with any other service.

\###Container aware class

If you wish to call it from a container aware class, a controller for example, just do `$this->get('dozoisch.buzz.browser');`.

\###Non-container aware class

To call it from a service which is not container aware, first add this to your services.yml

```
services:
  my.super.service:
    class: xclass.class
    arguments: ['@dozoisch.buzz.browser']
```

And make sure to have the appropriate constructor in your class :

```
/** @var Buzz\Browser */
protected $browser;

public function __construct(\Buzz\Browser $browser) {
    $this->browser = $browser;
}
```

\###Actually using it

After retrieving the browser, you can use it as you would with the normal buzz browser. This bundles is meant to be used seamlessly over the normal buzz instance.

```
$response = $this->browser->get("http://example.com");
$content = $response->getContent();
```

The available functions are post, head, patch, put, delete.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% 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

4664d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4422516?v=4)[Hugo Dozois](/maintainers/dozoisch)[@dozoisch](https://github.com/dozoisch)

---

Top Contributors

[![dozoisch](https://avatars.githubusercontent.com/u/4422516?v=4)](https://github.com/dozoisch "dozoisch (20 commits)")[![mccahan](https://avatars.githubusercontent.com/u/2308923?v=4)](https://github.com/mccahan "mccahan (2 commits)")

---

Tags

curlhttp clientcache

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dozoisch-cachedbuzz/health.svg)

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

###  Alternatives

[kriswallsmith/buzz

Lightweight HTTP client

1.9k31.9M462](/packages/kriswallsmith-buzz)[smi2/phpclickhouse

PHP ClickHouse Client

84711.1M80](/packages/smi2-phpclickhouse)[eightpoints/guzzle-bundle

Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony. Comes with easy and powerful configuration options and optional plugins.

44512.4M57](/packages/eightpoints-guzzle-bundle)[aplus/http-client

Aplus Framework HTTP Client Library

2171.6M1](/packages/aplus-http-client)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4540.5k](/packages/ismaeltoe-osms)[zoonman/pixabay-php-api

PixabayClient is a PHP HTTP client library to access Pixabay's API

3355.9k](/packages/zoonman-pixabay-php-api)

PHPackages © 2026

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