PHPackages                             devgeniem/wp-redis-group-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. devgeniem/wp-redis-group-cache

ActiveWordpress-muplugin[Caching](/categories/caching)

devgeniem/wp-redis-group-cache
==============================

A plugin extending the Redis Object Cache for WordPress with a group cache functionality

3.1.2(3y ago)513.0k3GPL-3.0PHPPHP &gt;=5.4

Since Dec 8Pushed 3y ago31 watchersCompare

[ Source](https://github.com/devgeniem/wp-redis-group-cache)[ Packagist](https://packagist.org/packages/devgeniem/wp-redis-group-cache)[ RSS](/packages/devgeniem-wp-redis-group-cache/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (7)Dependencies (1)Versions (17)Used By (0)

[![geniem-github-banner](https://cloud.githubusercontent.com/assets/5691777/14319886/9ae46166-fc1b-11e5-9630-d60aa3dc4f9e.png)](https://cloud.githubusercontent.com/assets/5691777/14319886/9ae46166-fc1b-11e5-9630-d60aa3dc4f9e.png)

WP Redis Group Cache
====================

[](#wp-redis-group-cache)

[![Latest Stable Version](https://camo.githubusercontent.com/9f6d7ee6b7f39a2cc645946454b38d0625059038731b2c4faf8c1d1220d79db6/68747470733a2f2f706f7365722e707567782e6f72672f64657667656e69656d2f77702d72656469732d67726f75702d63616368652f762f737461626c65)](https://packagist.org/packages/devgeniem/wp-redis-group-cache)[![Total Downloads](https://camo.githubusercontent.com/d1155ef5ef5ad07eaead3a67dee4984a3d6dd441ed919087af4e4bb14e7b562b/68747470733a2f2f706f7365722e707567782e6f72672f64657667656e69656d2f77702d72656469732d67726f75702d63616368652f646f776e6c6f616473)](https://packagist.org/packages/devgeniem/wp-redis-group-cache)[![Latest Unstable Version](https://camo.githubusercontent.com/364f440dbd9f75c59fa86631d570d2ebd069dbd1f5f7837b3750db82c43479f9/68747470733a2f2f706f7365722e707567782e6f72672f64657667656e69656d2f77702d72656469732d67726f75702d63616368652f762f756e737461626c65)](https://packagist.org/packages/devgeniem/wp-redis-group-cache)[![License](https://camo.githubusercontent.com/228bc01d4fd3b17cba661490c1d9b732b2e9fdf15c14b7dc96f2a3bd01ddc7c5/68747470733a2f2f706f7365722e707567782e6f72672f64657667656e69656d2f77702d72656469732d67726f75702d63616368652f6c6963656e7365)](https://packagist.org/packages/devgeniem/wp-redis-group-cache)

This WordPress mu-plugin enables group caching for sites using the [Redis Object Cache for WordPress](https://github.com/devgeniem/wp-redis-object-cache-dropin) dropin.

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

[](#installation)

Install with composer:

```
$ composer require devgeniem/wp-redis-group-cache

```

OR add it into your `composer.json`:

```
{
  "require": {
    "devgeniem/wp-redis-group-cache": "^3.0.0"
  }
}
```

Functionalities
---------------

[](#functionalities)

### Creating the cache group

[](#creating-the-cache-group)

Defining a group for WP Object Cache items enables simultaneous cache invalidation for a set of cache items. See the [codex](https://codex.wordpress.org/Function_Reference/wp_cache_set) for further information on setting the group key. The following functions create the object cache functionality by hooking to the Redis Object Cache dropin:

**add\_to\_group**

This function is hooked to the cache setting with the `wp_cache_set` function. If a group key is set for `wp_cache_set`, the cache key is pushed into a Redis hash list mapped by the group key.

**delete\_from\_group**

This function is hooked to the cache deletion with the `wp_cache_delete` function. If a group key is set for `wp_cache_delete`, the specified item key is removed from the group list. This ensures the group only has keys that actually exist in the object cache.

### Invalidating a cache group

[](#invalidating-a-cache-group)

**delete\_group**

This function deletes all data related to a group key by first fetching all keys and deleting them from Redis and then deleting the Redis hash list of the group.

Usage:

```
\Geniem\GroupCache::delete_group( $group_key );

```

Excluding custom or including default groups to caching
-------------------------------------------------------

[](#excluding-custom-or-including-default-groups-to-caching)

The Redis dropin automatically caches all data stored with WordPress Object Cache into Redis. If you want to modify which groups are stored you can use the two filters `geniem/cache/no_group_cache/blacklist` and `geniem/cache/no_group_cache`.

### Modifying the blacklist

[](#modifying-the-blacklist)

If you want to include some default groups like `acf` or `transient` or exclude custom ones for example from plugins that use it, you can use the `geniem/cache/no_group_cache/blacklist` filter to modify an array of blacklisted groups.

```
function group_cache_blacklist( array $groups ) : array {
	$groups[] = 'customgroup';
	return $groups;
}
add_filter( 'geniem/cache/no_group_cache/blacklist', 'group_cache_blacklist', 1, 1 );
```

#### Exluded groups by default

[](#exluded-groups-by-default)

[classes/cache.php](classes/cache.php#L109)

### More specific selection if a group should be excluded

[](#more-specific-selection-if-a-group-should-be-excluded)

You can do a more direct check if a group should be exluded by using the `geniem/cache/no_group_cache` filter. *Note this is applied after the blacklist check, so if the group is already on the blacklist this will not be checked.*

```
function no_group_cache( string $group, string $key ) : bool {
    if ( 'no_caching_key' === $group ) {
        return true;
    } else {
        return false;
    }
}
add_filter( 'geniem/cache/no_group_cache', 'no_group_cache', 1, 2 );
```

*Note that this does not disable the initial key-value caching!*

Example
-------

[](#example)

See this [Github gist](https://gist.github.com/villesiltala/f64b63070ed1dd082cb5ae0382974b8b) for a usage example.

Maintainers
-----------

[](#maintainers)

[@villesiltala](https://github.com/villesiltala)

License
-------

[](#license)

GPLv3

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 57.9% 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 ~194 days

Recently: every ~537 days

Total

13

Last Release

1118d ago

Major Versions

0.0.3 → 1.0.02017-01-27

1.0.3 → 2.0.02017-06-06

2.0.1 → 3.0.02018-12-19

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11960000?v=4)[Hion Digital Oy](/maintainers/devgeniem)[@devgeniem](https://github.com/devgeniem)

---

Top Contributors

[![godbone](https://avatars.githubusercontent.com/u/17048560?v=4)](https://github.com/godbone "godbone (11 commits)")[![villepietarinen](https://avatars.githubusercontent.com/u/5517842?v=4)](https://github.com/villepietarinen "villepietarinen (4 commits)")[![drawpause](https://avatars.githubusercontent.com/u/655372?v=4)](https://github.com/drawpause "drawpause (3 commits)")[![onnimonni](https://avatars.githubusercontent.com/u/5691777?v=4)](https://github.com/onnimonni "onnimonni (1 commits)")

---

Tags

pluginwordpressrediscacheobject-cache

### Embed Badge

![Health badge](/badges/devgeniem-wp-redis-group-cache/health.svg)

```
[![Health](https://phpackages.com/badges/devgeniem-wp-redis-group-cache/health.svg)](https://phpackages.com/packages/devgeniem-wp-redis-group-cache)
```

###  Alternatives

[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[rtcamp/nginx-helper

Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also provides cloudflare edge cache purging with Cache-Tags.

23517.0k1](/packages/rtcamp-nginx-helper)[rarst/fragment-cache

WordPress plugin for partial and async caching of heavy front-end elements.

14115.0k2](/packages/rarst-fragment-cache)

PHPackages © 2026

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