PHPackages                             encoredigitalgroup/laravel-cache-prune - 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. encoredigitalgroup/laravel-cache-prune

ActiveLibrary[Caching](/categories/caching)

encoredigitalgroup/laravel-cache-prune
======================================

v1.1.0(1mo ago)01.3k[1 PRs](https://gitlab.encoredigitalgroup.com/oss/laravel-cache-prune/pulls)BSD-3-ClausePHPPHP ^8.3CI passing

Since May 5Pushed 1mo agoCompare

[ Source](https://gitlab.encoredigitalgroup.com/oss/laravel-cache-prune)[ Packagist](https://packagist.org/packages/encoredigitalgroup/laravel-cache-prune)[ RSS](/packages/encoredigitalgroup-laravel-cache-prune/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (1)Dependencies (26)Versions (12)Used By (0)

EncoreDigitalGroup/LaravelCachePrune
====================================

[](#encoredigitalgrouplaravelcacheprune)

### Overview

[](#overview)

This is a very simple package. It provides a singular command `cache:prune`. This command mimics the `cache:clear` command's functionality with one slight difference; it only works on expired cache items in the `DatabaseStore`. If this command is used on any other cache driver, it will throw a `RuntimeException`.

### Installation

[](#installation)

Run `composer require encoredigitalgroup/laravel-cache-prune`. There is no need to do anything else; this package will automatically register the command from its Service Provider.

### Why?

[](#why)

When using the database store in Laravel, when a cache item expires, it is not automatically removed from the cache table. Instead it stays there forever, or until that same cache key is reused with a new value. Running this command will clean up any lingering database rows in the cache table.

### Usage

[](#usage)

Simply run `php artisan cache:prune` from your terminal and let this command cleanup your cache table. You can also add this to you `routes/console.php`to run this on a set schedule:

```
use EncoreDigitalGroup\LaravelCachePrune\Console\Commands\CachePruneCommand;use Illuminate\Support\Facades\Schedule;

Schedule::command("cache:prune")->daily(); // Or any other interval you prefer.

//OR

Schedule::command(CachePruneCommand::class)->daily(); // Or any other interval you prefer.
```

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance92

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.4% 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 ~385 days

Total

2

Last Release

41d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/50760632?v=4)[Marc Beinder](/maintainers/onairmarc)[@onairmarc](https://github.com/onairmarc)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (135 commits)")[![onairmarc](https://avatars.githubusercontent.com/u/50760632?v=4)](https://github.com/onairmarc "onairmarc (5 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/encoredigitalgroup-laravel-cache-prune/health.svg)

```
[![Health](https://phpackages.com/badges/encoredigitalgroup-laravel-cache-prune/health.svg)](https://phpackages.com/packages/encoredigitalgroup-laravel-cache-prune)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[api-platform/laravel

API Platform support for Laravel

58171.8k14](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3417.0k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

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