PHPackages                             whoa-php/redis-tagged-cache - 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. whoa-php/redis-tagged-cache

ActiveLibrary[Caching](/categories/caching)

whoa-php/redis-tagged-cache
===========================

Redis-based Cache with Tags implementation.

00PHP

Since Jul 27Pushed 3y agoCompare

[ Source](https://github.com/whoa-php/redis-tagged-cache)[ Packagist](https://packagist.org/packages/whoa-php/redis-tagged-cache)[ RSS](/packages/whoa-php-redis-tagged-cache/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7f930bdffcb2083a329cd6447b2628380acff6956910b8c215325306b98901e3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f77686f612d7068702f72656469732d7461676765642d63616368652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/whoa-php/redis-tagged-cache/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/e05061b2f1f600cd06e0402d93283d6b85f956a08e1623c80ff1edca41ae9c03/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f77686f612d7068702f72656469732d7461676765642d63616368652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/whoa-php/redis-tagged-cache/?branch=master)[![Build Status](https://camo.githubusercontent.com/e98f26c49c54247049087ffc90d576dcb44233425acebd4b925a708455e8612e/68747470733a2f2f7472617669732d63692e6f72672f77686f612d7068702f72656469732d7461676765642d63616368652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/whoa-php/redis-tagged-cache)[![License](https://camo.githubusercontent.com/76f2ade090cd2f9ae024979222200432f304aaea64ebc8b60a956b40c565fa72/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f77686f612d7068702f72656469732d7461676765642d63616368652e737667)](https://packagist.org/packages/whoa-php/redis-tagged-cache)

Summary
-------

[](#summary)

This is component for [Whoa Framework](https://github.com/whoa-php/redis-tagged-cache) that adds storing extra information (tags) in [Redis](https://redis.io/) cache.

Each method works in transactional way. The methods implement

- Adding value to cache with associated string tags and TTL (time-to-live).
- Removing cached value by key and associated tags.
- Invalidation (deletion) all cached values by tag.

It is designed to be easily combined with classes that work with Redis cache. All methods could be renamed using [PHP Trait Conflict Resolution](https://www.php.net/manual/en/language.oop5.traits.php#language.oop5.traits.conflict) and visibility changed with [PHP Trait Changing Method Visibility](https://www.php.net/manual/en/language.oop5.traits.php#language.oop5.traits.visibility).

Integration example

```
use Whoa\RedisTaggedCache\RedisTaggedCacheTrait;
use Redis;

/** @var Redis $redis */
$redis = ...;

$cache = new class ($redis)
{
    use RedisTaggedCacheTrait;

    public function __construct(Redis $redis)
    {
        $this->setRedisInstance($redis);
    }
};

$cache->addTaggedValue('key1', 'value1', ['author:1', 'comment:2']);
$cache->addTaggedValue('key2', 'value2', ['author:1', 'comment:2']);
$cache->addTaggedValue('key3', 'value3', ['author:1', 'comment:2']);

// removes the first key-pair
$cache->removeTaggedValue('key1');

// removes 2 remaining values
$cache->invalidateTag('author:1');
```

[More info](https://github.com/whoa-php/redis-tagged-cache).

Testing
-------

[](#testing)

```
$ composer test
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/f9f27f9156b44aff1c4899ef244b091bf80844e6f29cab364a2908dd46f0996b?d=identicon)[dreamsbond](/maintainers/dreamsbond)

---

Top Contributors

[![neomerx](https://avatars.githubusercontent.com/u/10420662?v=4)](https://github.com/neomerx "neomerx (736 commits)")[![dreamsbond](https://avatars.githubusercontent.com/u/26112605?v=4)](https://github.com/dreamsbond "dreamsbond (2 commits)")

### Embed Badge

![Health badge](/badges/whoa-php-redis-tagged-cache/health.svg)

```
[![Health](https://phpackages.com/badges/whoa-php-redis-tagged-cache/health.svg)](https://phpackages.com/packages/whoa-php-redis-tagged-cache)
```

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

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