This package will remove any expired cache file, this only works with file
cache driver. It will also remove any empty folder after removing the expired cache files, so your cache folder will be totally clean.
- Add arifhp86/laravel-clear-expired-cache-file to your project:
composer require arifhp86/laravel-clear-expired-cache-file
- For Laravel >= 5.5 we use Package Auto-Discovery, so you may skip this step.
For Laravel < 5.5, add
CacheClearServiceProvider
to the providers array in config/app.php:
Arifhp86\ClearExpiredCacheFile\Providers\CacheClearServiceProvider::class,
php artisan cache:clear-expired
MIT, (c) 2019 Arifur Rahman