PHPackages                             slabphp/cache-manager - 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. slabphp/cache-manager

ActiveLibrary[Caching](/categories/caching)

slabphp/cache-manager
=====================

SlabPHP Cache Manager Library

v0.1.2(8y ago)0561Apache-2.0PHP

Since Feb 15Pushed 7y ago1 watchersCompare

[ Source](https://github.com/SlabPHP/cache-manager)[ Packagist](https://packagist.org/packages/slabphp/cache-manager)[ Docs](https://www.salernolabs.com/slab)[ RSS](/packages/slabphp-cache-manager/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (4)Used By (1)

SlabPHP Cache Manager
=====================

[](#slabphp-cache-manager)

The SlabPHP Cache Management Driver Library wraps several different types of cache providers and gives a single interface to them.

This library is deprecated but since it's still part of the SlabPHP monorepo it's being open sourced as well. There are better alternatives that adopt PSR standards that you should use. The author of this library doesn't even consider wrapping all these different libraries together as a good pattern for cache. Please see the main SlabPHP documentation for more information about this and the other SlabPHP repositories.

Installation and Setup
----------------------

[](#installation-and-setup)

First include this with composer:

```
composer require slabphp/cache-manager

```

Then create your provider object:

```
$provider = new \Slab\Cache\Providers\Predis();
$provider
    ->setHost('locallhost', 6379);

$driver = new \Slab\Cache\Driver();
$driver
    ->setProvider($provider);

```

Usage
-----

[](#usage)

### Using a Request Object

[](#using-a-request-object)

The Request object is designed to wrap the getting and setting of cache in one basic step.

```
$request = new \Slab\Cache\Request();

$request
    ->setCacheKey('my-key')
    ->setCacheTTL(3600)
    ->setCallback($someObject, 'someCallBackFunction', ['value1'])
    ->setForceRefresh(!empty($_GET['cacheRefresh']));

$output = $driver->execute($request);

```

What this does is first check the set cache provider for a value with the key 'my-key'. If it exists, it will return it. Otherwise, it will execute $someObject-&gt;someCallBackFunction('value1'), save the value with key 'my-key' and a ttl of 3600 seconds, and then return it.

### Other ways

[](#other-ways)

You can do get(), set(), and delete() on the driver and they will pass through to the provider. You can also do -&gt;getProvider() on the driver to perform any provider specific actions.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

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

3

Last Release

3011d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/155974?v=4)[Eric Salerno](/maintainers/ericsalerno)[@ericsalerno](https://github.com/ericsalerno)

---

Top Contributors

[![ericsalerno](https://avatars.githubusercontent.com/u/155974?v=4)](https://github.com/ericsalerno "ericsalerno (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/slabphp-cache-manager/health.svg)

```
[![Health](https://phpackages.com/badges/slabphp-cache-manager/health.svg)](https://phpackages.com/packages/slabphp-cache-manager)
```

###  Alternatives

[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k348.9M2.5k](/packages/symfony-cache)[cache/adapter-common

Common classes for PSR-6 adapters

11124.4M38](/packages/cache-adapter-common)[amphp/redis

Efficient asynchronous communication with Redis servers, enabling scalable and responsive data storage and retrieval.

165634.7k44](/packages/amphp-redis)[ethanhann/redisearch-php

239113.6k1](/packages/ethanhann-redisearch-php)[neos/cache

Neos Cache Framework

102.0M31](/packages/neos-cache)[pdffiller/qless-php

PHP Bindings for qless

29113.2k1](/packages/pdffiller-qless-php)

PHPackages © 2026

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