PHPackages                             bookking3000/guzzcache - 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. bookking3000/guzzcache

ActiveLibrary

bookking3000/guzzcache
======================

A in-File JSON-Cache for storing Guzzle HTTP Responses from REST-APIs

v1.0.2(4y ago)0219MITPHP

Since Feb 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/bookking3000/Guzzcache)[ Packagist](https://packagist.org/packages/bookking3000/guzzcache)[ RSS](/packages/bookking3000-guzzcache/feed)WikiDiscussions master Synced 1mo ago

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

Guzzcache
=========

[](#guzzcache)

A in-File JSON-Cache for storing Guzzle HTTP Responses from REST-APIs

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

[](#installation)

Install using composer:

```
    composer require bookking3000/guzzcache

```

Autoloading
-----------

[](#autoloading)

Please include the following to autoload Classes

```
    require_once __DIR__.'/vendor/bookking3000/guzzcache/autoload.php';

```

Usage
-----

[](#usage)

```
    //Initialize Json-File for Caching.
    $jsonCache = new JsonCache();
    $jsonCache->setCachePath($this->cachePath);

    //Initialize GuzzCache and set the Cache to the Cache initialized before.
    $guzzCache = new GuzzCache();
    $guzzCache->setCache($jsonCache);

    //If your request was already sent, this method will retrieve it from the local in-File Cache
    $content = $guzzCache->httpQuery("https://jsonplaceholder.typicode.com/todos/1", "GET");

```

Lifetime
--------

[](#lifetime)

Default Lifetime is 30 days / 2592000 Seconds.

You can change it as follows:

```
    $jsonCache = new JsonCache();
    $jsonCache->setCachePath($this->cachePath);
    $jsonCache->setLifetime(60); //60 Seconds

```

To disable Lifetime, set Lifetime to 0.

```
    $jsonCache = new JsonCache();
    $jsonCache->setCachePath($this->cachePath);
    $jsonCache->setLifetime(0);

```

Debug
-----

[](#debug)

Setting Debug to true, will log all Requests. By Default only Requests with non 2xx Response Status-Codes are logged.

The Log is stored in the logs-Folder in the Library-Directory itself.

```
    $guzzCache = new GuzzCache();
    $guzzCache->setDebug(true);

```

Changelog
=========

[](#changelog)

2022-02-15
----------

[](#2022-02-15)

- Added Expiry-Time to Cache

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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 ~1 days

Total

3

Last Release

1553d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6bb9b5dc9c5c85a24f88adf88507379cbd6278ea6c536ffd4a5924792f12c2b9?d=identicon)[bookking3000](/maintainers/bookking3000)

---

Top Contributors

[![bookking3000](https://avatars.githubusercontent.com/u/15048135?v=4)](https://github.com/bookking3000 "bookking3000 (11 commits)")

### Embed Badge

![Health badge](/badges/bookking3000-guzzcache/health.svg)

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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