cms-multi/filament-clear-cache
Adds a “Clear Cache” button to your Filament admin toolbar so you can quickly run cache-clearing commands without leaving the panel. Supports Filament v2–v5 (via plugin versions) and configurable via a publishable config.
optimize:clear command (or custom commands), ensuring compatibility with Laravel’s caching mechanisms (Redis, Memcached, file-based, etc.).panel() method of a Filament service provider.page-cache:clear).optimize:clear, which can be resource-intensive. Mitigation:
page-cache:clear) requires ensuring those commands exist in your Laravel app. Risk: Broken links if commands are undefined.Filament Version Alignment:
Cache Strategy:
cache:clear logic)? If so, will the package’s default optimize:clear suffice, or do you need to extend it?Environment Safety:
->enabled(App::environment(['local', 'staging'])).UI/UX Impact:
visible config option.Monitoring:
clearCacheIncrement Livewire event—can this be logged or tied to analytics?Rollback Plan:
php artisan cache:clear).optimize command.Prerequisites:
Installation Steps:
composer require cms-multi/filament-clear-cache
php artisan vendor:publish --provider="CmsMulti\FilamentClearCache\FilamentClearCacheServiceProvider"
composer.json under require-dev if cache clearing is a dev-only feature.Plugin Registration:
Modify your Filament panel configuration (e.g., app/Providers/Filament/AdminPanelProvider.php):
public function panel(Panel $panel): Panel {
return $panel
->plugins([
FilamentClearCachePlugin::make()
->enabled(App::environment(['local', 'staging'])),
]);
}
enabled() method to restrict access to specific environments.Customization (Optional):
use CmsMulti\FilamentClearCache\Facades\FilamentClearCache;
public function boot() {
FilamentClearCache::addCommand('page-cache:clear');
}
config/filament-clear-cache.php) to adjust button visibility, translations, or session keys.Testing:
composer.json to avoid auto-upgrades that might break compatibility.
"cms-multi/filament-clear-cache": "^3.0"
Phase 1: Dev/Staging Rollout
Phase 2: Production Considerations
->enabled() to restrict access.Phase 3: Customization (If Needed)
config/filament-clear-cache.php for overrides.app/Console/Kernel.php.How can I help you explore Laravel packages today?