PHPackages                             ebects/laravel-cache-group - 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. ebects/laravel-cache-group

ActiveLibrary[Caching](/categories/caching)

ebects/laravel-cache-group
==========================

Group-based cache invalidation for Laravel — organize cache by groups, invalidate by scope (user/role/custom), with automatic Redis Cluster compatibility.

v1.0.7(2mo ago)135MITPHPPHP ^8.1|^8.2|^8.3

Since Feb 11Pushed 2mo agoCompare

[ Source](https://github.com/ebectsali/laravel-cache-group)[ Packagist](https://packagist.org/packages/ebects/laravel-cache-group)[ Docs](https://github.com/ebectsali/laravel-cache-group)[ RSS](/packages/ebects-laravel-cache-group/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (18)Versions (10)Used By (0)

Laravel Cache Group
===================

[](#laravel-cache-group)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a8b7ff6dc88c0c2036489656f0b3597971bea365b562641dff316288d1404f67/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6562656374732f6c61726176656c2d63616368652d67726f75702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ebects/laravel-cache-group)[![Total Downloads](https://camo.githubusercontent.com/0a4985225be108d77b8c6b633c68cad2af166f07a26f37e8a1737924962e5aa6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6562656374732f6c61726176656c2d63616368652d67726f75702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ebects/laravel-cache-group)[![PHP Version](https://camo.githubusercontent.com/e3c86bd64908b4277bd6e670cd1ec02ad95a823161b2149ba49b2248377fb535/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6562656374732f6c61726176656c2d63616368652d67726f75702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ebects/laravel-cache-group)[![License](https://camo.githubusercontent.com/ce893104b1b8f39f94ffe36843484017f966a7c04997dadc9e5a74865d8ba374/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6562656374732f6c61726176656c2d63616368652d67726f75702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ebects/laravel-cache-group)

Group-based cache invalidation for Laravel — organize cache by groups, invalidate by scope (user/role/custom), with automatic Redis Cluster compatibility.

Features
--------

[](#features)

- 📦 **Cache Groups** — organize cache per feature/module with a dedicated class
- 🎯 **Scoped Invalidation** — per user, role, tenant, or any custom scope
- 🔗 **Cascading Dependencies** — invalidate related groups automatically via `also_invalidate`
- 🛡️ **Redis Cluster Ready** — auto-detect single/cluster mode, zero config
- ⚡ **Throttle/Debounce** — protect against invalidation storms
- 🔐 **Queue Safe** — explicit scope resolution for jobs without auth context
- 🔌 **Pluggable Auth** — works with Sanctum, JWT, Passport, or any custom auth
- 🔍 **Artisan Commands** — inspect, validate, and monitor cache groups
- 🧪 **Testing Utilities** — FakeCacheManager with assertion helpers
- 📝 **CacheGroupStore** — scope-aware `remember()` and `rememberResource()` helpers

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

[](#installation)

```
composer require ebects/laravel-cache-group
```

Publish the config (optional):

```
php artisan vendor:publish --tag=cache-group-config
```

Quick Start
-----------

[](#quick-start)

### 1. Create a Cache Group

[](#1-create-a-cache-group)

```
