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)0571Apache-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 2d 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

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

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

3059d 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.2k373.5M3.2k](/packages/symfony-cache)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[symfony/http-kernel

Provides a structured process for converting a Request into a Response

8.1k869.4M8.5k](/packages/symfony-http-kernel)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k13](/packages/tempest-framework)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k48](/packages/ecotone-ecotone)

PHPackages © 2026

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