PHPackages                             cheese44/cheesecache - 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. [Caching](/categories/caching)
4. /
5. cheese44/cheesecache

ActiveLibrary[Caching](/categories/caching)

cheese44/cheesecache
====================

A request scoped cache library for PHP with the goal to make caching consistent and maintainable.

v0.8-stable(9y ago)318[3 issues](https://github.com/cheese44/cheesecache/issues)MITPHPPHP &gt;=5.3

Since Jul 23Pushed 9y ago1 watchersCompare

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

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

cheeseCache
===========

[](#cheesecache)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)[![Build Status](https://camo.githubusercontent.com/9e6e2cbd2e4bc676c862a29645f3072f8e5ca3b4ee4b7d20137927f6f9e883ce/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f63686565736534342f63686565736563616368652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/cheese44/cheesecache)[![Coverage Status](https://camo.githubusercontent.com/372643b83dbd42e08831aa9e2dda9af3ebe7fcee3096b972ef64b5dac1d5cf97/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f63686565736534342f63686565736543616368652e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/github/cheese44/cheeseCache)

A request scoped cache library for PHP with the goal to make caching consistent and maintainable.

Best used for caching function and query results that are called multiple times during a request and are unlikely to change

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

[](#installation)

Package is available on [Packagist](https://packagist.org/packages/cheese44/cheesecache), you can install it using [Composer](http://getcomposer.org).

```
composer require cheese44/cheesecache
```

Usage
-----

[](#usage)

```
    use cheeseCache\app;

    class Test {

        /**
         * cheeseCache does all the work for you
         *
         * you don't have to clutter your code with checking, setting and reading the cache yourself
         */
        public function cacheSum($a, $b) {
            $cache = cheeseCache\app\cacheProvider::getCache();

            $sum = $cache->cache(
                array($a, $b),
                function() use($a, $b) {
                    return $a + $b;
                });

            return $sum;
        }

        /**
         * of course cheeseCache still gives you the possibility to manually access these functionalities
         */
        public function cacheSum_Explicit($a, $b) {
            $cache = cheeseCache\app\cacheProvider::getCache();

            if($cache->isCacheSet(array($a, $b))):
                return $cache->geCacheValue(array($a, $b));
            endif;

            $sum = $a + $b;

            $cache->cache(
                array($a, $b),
                $sum
            );

            return $sum;
        }

    }

```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

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

Total

2

Last Release

3623d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/920ee439e6dde20646b39826313d100d6e268df986035aa5cb0ace72eae3c4b6?d=identicon)[cheese44](/maintainers/cheese44)

---

Top Contributors

[![cheese44](https://avatars.githubusercontent.com/u/9726235?v=4)](https://github.com/cheese44 "cheese44 (35 commits)")

---

Tags

cachecachingrequest scoperequest scoped

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cheese44-cheesecache/health.svg)

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

###  Alternatives

[psr/simple-cache

Common interfaces for simple caching

8.1k757.1M2.6k](/packages/psr-simple-cache)[react/cache

Async, Promise-based cache interface for ReactPHP

445124.5M44](/packages/react-cache)[tedivm/stash

The place to keep your cache.

9614.9M126](/packages/tedivm-stash)[spatie/blink

Cache that expires in the blink of an eye

1675.3M10](/packages/spatie-blink)[gregwar/cache

A lightweight file-system cache system

1084.6M23](/packages/gregwar-cache)[putyourlightson/craft-blitz

Intelligent static page caching for creating lightning-fast sites.

155480.1k35](/packages/putyourlightson-craft-blitz)

PHPackages © 2026

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