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

ActiveLibrary[Caching](/categories/caching)

limoncello-php/redis-tagged-cache
=================================

Redis-based Cache with Tags implementation.

0.10.0(7y ago)017Apache-2.0PHPPHP &gt;=7.1.0

Since May 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/limoncello-php-dist/redis-tagged-cache)[ Packagist](https://packagist.org/packages/limoncello-php/redis-tagged-cache)[ Docs](https://github.com/limoncello-php/framework/tree/master/components/RedisTaggedCache)[ RSS](/packages/limoncello-php-redis-tagged-cache/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (6)Versions (3)Used By (0)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7aaee1299937d48d789be0cb84cf33409c3de0f692ca6f325e215bb8d7c07c72/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c696d6f6e63656c6c6f2d7068702d646973742f72656469732d7461676765642d63616368652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/limoncello-php-dist/redis-tagged-cache/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/cb15aa09e7dcc35c5f2e7edbac9c6bea3b1f3a3be0fd61e0a29a8cc6cd24643d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c696d6f6e63656c6c6f2d7068702d646973742f72656469732d7461676765642d63616368652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/limoncello-php-dist/redis-tagged-cache/?branch=master)[![Build Status](https://camo.githubusercontent.com/d6107c7f41860b9a4da56a875e2f5c086859d6858fada07d6c68c73171127e10/68747470733a2f2f7472617669732d63692e6f72672f6c696d6f6e63656c6c6f2d7068702d646973742f72656469732d7461676765642d63616368652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/limoncello-php-dist/redis-tagged-cache)[![License](https://camo.githubusercontent.com/3ee782c9b5e87cbec66eb902c2bc6b29d10e8190c9143176c95e07565e02f487/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c696d6f6e63656c6c6f2d7068702f6672616d65776f726b2e737667)](https://packagist.org/packages/limoncello-php/framework)

Summary
-------

[](#summary)

This is component for [Limoncello Framework](https://github.com/limoncello-php/framework) 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 Limoncello\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/limoncello-php/framework).

Testing
-------

[](#testing)

```
$ composer test
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

2590d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0da01dc445667261310b897ad80724e8c63130515b03159c79b1eeb2f3983c9a?d=identicon)[neomerx](/maintainers/neomerx)

---

Top Contributors

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

---

Tags

rediscachetagged cache

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[tedivm/stash

The place to keep your cache.

9614.9M126](/packages/tedivm-stash)[awssat/laravel-visits

Laravel Redis visits counter for Eloquent models

974169.8k2](/packages/awssat-laravel-visits)[swayok/alternative-laravel-cache

Replacements for Laravel's redis and file cache stores that properly implement tagging idea. Powered by cache pool implementations provided by http://www.php-cache.com/

202570.3k8](/packages/swayok-alternative-laravel-cache)[cache/redis-adapter

A PSR-6 cache implementation using Redis (PhpRedis). This implementation supports tags

534.0M27](/packages/cache-redis-adapter)[tedivm/stash-bundle

Incorporates the Stash caching library into Symfony.

841.4M16](/packages/tedivm-stash-bundle)[kdyby/redis

Redis storage for Nette Framework

491.7M2](/packages/kdyby-redis)

PHPackages © 2026

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