Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Filament Clear Cache

Filament Clear Cache Laravel Package

cms-multi/filament-clear-cache

Filament Clear Cache adds a one-click cache-clearing button to your Filament admin panel toolbar. Install via Composer, register the plugin on your panel, and optionally publish the config or restrict it to specific environments. Supports Filament 2.x, 3.x, 4.x and 5.x.

View on GitHub
Deep Wiki
Context7

Filament Clear Cache adds a one-click cache-clearing button to your Filament admin panel header, letting you flush cached data without running artisan commands or leaving the dashboard. It plugs directly into Filament's panel plugin system, installs via Composer, and supports Filament 4.x/5.x on PHP 8.2+ (older branches cover Filament 2.x and 3.x).

  • One-click button in the admin toolbar for instant cache clearing
  • Simple registration with FilamentClearCachePlugin::make()
  • Conditional enabling via the enabled() method for specific environments
  • Publishable config to customize plugin behavior
  • Broad compatibility across Filament 2.x, 3.x, 4.x and 5.x
Frequently asked questions about Filament Clear Cache
What is cms-multi/filament-clear-cache and what problem does it solve?
It is a single-purpose Filament panel plugin that adds a header action, shown as a trash icon with a counter badge, to clear Laravel caches without using the CLI. It is a thin presentation layer over Laravel's cache commands and is only relevant if your admin panel is built with Filament. The default action shells out to an Artisan command, typically optimize:clear.
How do I install and register Filament Clear Cache in a Laravel Filament panel?
Install with composer require cms-multi/filament-clear-cache, optionally publish the config using the vendor:publish command for FilamentClearCacheServiceProvider, then add FilamentClearCachePlugin::make() to your panel's plugins array. Pin the package major version against your Filament version before installing. No schema migration or required config file is needed to boot.
Which Filament and Laravel versions does this package support?
The 3.x line targets Filament 4.x and 5.x, PHP >8.2, and Laravel 11–13 according to the compatibility notes. Older lines map 1.x to Filament 2.x/PHP >8.0 and 2.x to Filament 3.x/PHP >8.1. Pin the package major version to your host app's Filament major, because plugin registration surfaces differ.
How can I enable the clear cache button only in specific environments?
Call enabled() on the plugin in your panel provider and pass an environment check, such as app()->environment('staging', 'production'), so the action is registered only where intended. The published config can also control related behavior such as session key and visibility. Keep the gating in code or config that is reviewed with your deploy settings.
Does Filament Clear Cache include authorization or permissions to restrict who can clear cache?
The package does not document a dedicated permission or policy for the clear cache action; visibility is effectively tied to panel access. That means any user who can reach the panel can trigger the flush unless you add your own gate. Teams with support agents or content editors should wrap or extend the action with a role or policy check.
Which Artisan command does the button run, and can I customize it?
The README says the default command is optimize:clear, but changelog 2.1.0 references a default that clears config only, so confirm what actually runs in your 3.x install. The plugin exposes addCommand() so you can register additional Artisan commands. Review the command scope before enabling it for non-engineers.
Is it safe to clear cache from the Filament admin panel in production?
optimize:clear clears cache, config, route, and view caches, which can be filesystem- and CPU-bound; on restricted hosting it may fail silently or time out. If sessions, queues, or rate limiter counters share the same cache store, a flush can log users out or reset throttling, and this side effect is not documented. Test on a staging copy of your production cache topology before exposing it broadly.
How does this package handle multi-node or load-balanced Laravel deployments?
The action clears caches on the node handling the request; in a load-balanced setup, sibling nodes can keep stale local file caches and OPcache. A shared Redis or Memcached store masks some cache divergence but does not make config, route, or view caches global. Decide whether the button complements or duplicates your deploy-time cache clearing.
Is there an audit log showing who cleared the cache and when?
There is no documented audit trail for who cleared the cache or when. If you need accountability, add logging or an event listener around the action in your own code. The package's small public API does not include a built-in history view.
Can I trigger cache clearing programmatically or add my own commands, and is the package tested?
The package documents a Livewire event, clearCacheIncrement, for updating the counter programmatically and addCommand() for extra Artisan commands. It ships with a test suite, CI, Pint code style, and Dependabot, but has low ecosystem validation (about 54 stars and zero dependents). For alternatives, run php artisan optimize:clear in deploy scripts or build a custom Filament action with your own authorization and logging.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo