PHPackages                             cms-multi/filament-clear-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. cms-multi/filament-clear-cache

ActiveLibrary[Caching](/categories/caching)

cms-multi/filament-clear-cache
==============================

Clear your cache easily from within filament

3.0.1(1mo ago)5450.1k↓38%7[1 PRs](https://github.com/cms-multi/filament-clear-cache/pulls)MITPHPPHP ^8.2CI passing

Since Dec 21Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/cms-multi/filament-clear-cache)[ Packagist](https://packagist.org/packages/cms-multi/filament-clear-cache)[ Docs](https://github.com/cms-multi/filament-clear-cache)[ GitHub Sponsors](https://github.com/howdu)[ RSS](/packages/cms-multi-filament-clear-cache/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (14)Versions (30)Used By (0)

Filament Clear Cache
====================

[](#filament-clear-cache)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9e7521ee787d7bbe659975061c3d0d5f03932db5bc081fcb7efa6aa015ea2bea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636d732d6d756c74692f66696c616d656e742d636c6561722d63616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cms-multi/filament-clear-cache)[![GitHub Tests Action Status](https://camo.githubusercontent.com/1d703e535f9a32d5b4c805b7e754a9dcd3d1a590dbc786a95fbfe13a47f6eaa9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636d732d6d756c74692f66696c616d656e742d636c6561722d63616368652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/cms-multi/filament-clear-cache/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/ae507c10968ed5e09a6005d47634b99812fe3f1e08871877667a9bf3a9efe069/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636d732d6d756c74692f66696c616d656e742d636c6561722d63616368652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/cms-multi/filament-clear-cache/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/100745b84a3c4faa6e498f664d0ebd325fbece019519dc64f156d90d91f569ca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636d732d6d756c74692f66696c616d656e742d636c6561722d63616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cms-multi/filament-clear-cache)

Add a button to easily clear the cache from your filament admin.

[![Filament Admin Toolbar Header](https://user-images.githubusercontent.com/533658/224348501-81f91bde-181c-454a-aafc-e633c1e7ae6f.png)](https://user-images.githubusercontent.com/533658/224348501-81f91bde-181c-454a-aafc-e633c1e7ae6f.png)

#### Compatibility

[](#compatibility)

Plugin VersionFilament VersionPHP Version[1.x](https://github.com/cms-multi/filament-clear-cache/tree/1.x)2.x&gt; 8.0[2.x](https://github.com/cms-multi/filament-clear-cache/tree/2.x)3.x&gt; 8.1[3.x](https://github.com/cms-multi/filament-clear-cache/tree/3.x)4.x + 5.x&gt; 8.2Installation
------------

[](#installation)

You can install the package via composer:

```
composer require cms-multi/filament-clear-cache
```

Configuration
-------------

[](#configuration)

You can publish the configuration with:

```
php artisan vendor:publish --provider="CmsMulti\FilamentClearCache\FilamentClearCacheServiceProvider"
```

### Registering the plugin

[](#registering-the-plugin)

```
use CmsMulti\FilamentClearCache\FilamentClearCachePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentClearCachePlugin::make(),
        ])
}
```

### Conditionally enabling the plugin

[](#conditionally-enabling-the-plugin)

You can restrict the plugin to specific environments using the `enabled()` method:

```
use CmsMulti\FilamentClearCache\FilamentClearCachePlugin;
use Illuminate\Support\Facades\App;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentClearCachePlugin::make()
                ->enabled(App::environment(['local', 'staging'])),
        ])
}
```

When disabled, the clear cache button will not be rendered.

Customizing
-----------

[](#customizing)

Under the hood `optimize:clear` is called after clicking the trash button.

You may register any custom commands from inside the `boot()` method of your Service Provider:

```
use CmsMulti\FilamentClearCache\Facades\FilamentClearCache;

public function boot()
{
    FilamentClearCache::addCommand('page-cache:clear');
}
```

To increment the button count call Livewire event `clearCacheIncrement`.

```
// Livewire v2
$this->emit('clearCacheIncrement');

// Livewire v3+
$this->dispatch('clearCacheIncrement')->to(\CmsMulti\FilamentClearCache\Http\Livewire\ClearCache::class);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [howdu](https://github.com/cms-multi)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance88

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 51.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 ~53 days

Recently: every ~92 days

Total

23

Last Release

59d ago

Major Versions

1.0.9 → 2.0.02023-08-01

2.1.1 → 3.0.02026-01-27

PHP version history (3 changes)1.0.0PHP ^8.1

1.0.4PHP ^8.0|^8.1

3.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/8195c4eb9911702f82979ada0c78ab53eacaea3a480e33b92d5a5871f38fbe79?d=identicon)[cms-multi](/maintainers/cms-multi)

---

Top Contributors

[![howdu](https://avatars.githubusercontent.com/u/533658?v=4)](https://github.com/howdu "howdu (80 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (25 commits)")[![cms-multi](https://avatars.githubusercontent.com/u/118010471?v=4)](https://github.com/cms-multi "cms-multi (24 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (16 commits)")[![grafst](https://avatars.githubusercontent.com/u/8471055?v=4)](https://github.com/grafst "grafst (3 commits)")[![a21ns1g4ts](https://avatars.githubusercontent.com/u/11599205?v=4)](https://github.com/a21ns1g4ts "a21ns1g4ts (2 commits)")[![davideprevosto](https://avatars.githubusercontent.com/u/28837345?v=4)](https://github.com/davideprevosto "davideprevosto (2 commits)")[![martin-ro](https://avatars.githubusercontent.com/u/10107779?v=4)](https://github.com/martin-ro "martin-ro (1 commits)")[![RChutchev](https://avatars.githubusercontent.com/u/11131666?v=4)](https://github.com/RChutchev "RChutchev (1 commits)")

---

Tags

cacheclear-cachefilamentfilamentphplaravellaravel-packagelivewirephplaravelfilamentphpfilament-clear-cache

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/cms-multi-filament-clear-cache/health.svg)

```
[![Health](https://phpackages.com/badges/cms-multi-filament-clear-cache/health.svg)](https://phpackages.com/packages/cms-multi-filament-clear-cache)
```

###  Alternatives

[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[ryangjchandler/blade-cache-directive

Cache chunks of your Blade markup with ease.

202200.8k2](/packages/ryangjchandler-blade-cache-directive)[guava/filament-modal-relation-managers

Allows you to embed relation managers inside filament modals.

7565.0k4](/packages/guava-filament-modal-relation-managers)[guava/filament-knowledge-base

A filament plugin that adds a knowledge base and help to your filament panel(s).

206120.5k1](/packages/guava-filament-knowledge-base)[lara-zeus/popover

Zeus Popover is filamentphp component to show a Popover with custom content in tables and infolist

2968.2k3](/packages/lara-zeus-popover)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)

PHPackages © 2026

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