LaravelPackages.net
Acme Inc.
Toggle sidebar
momokang/laravel-clean-file-cache

Clean up expired laravel cache files if system is using file as cache driver

109
0
1.1
About momokang/laravel-clean-file-cache

momokang/laravel-clean-file-cache is a Laravel package for clean up expired laravel cache files if system is using file as cache driver. It currently has 0 GitHub stars and 109 downloads on Packagist (latest version 1.1). Install it with composer require momokang/laravel-clean-file-cache. Discover more Laravel packages by momokang or browse all Laravel packages to compare alternatives.

Last updated

LaravelCleanFileCache

Software License

When using file as cache driver, Laravel creates cache files but never purges expired ones. This can lead to server overload of cache files which drained up storage spaces.

This package creates an artisan command cache:cleanup that will clean up your cache files, removing any that had expired. You may run this manually or include it in a schedule.

Thanks to TerrePorter for his suggestion on laravel.io!

Thanks to jdavidbakr for his packagist but I decided to learn how to create my own packagist and how this formed!

Install

Via Composer

$ composer require momokang/laravel-clean-file-cache

Then add the service provider to app/Console/Kernel.php in the $commands array:

\momokang\CleanFileCache\CleanFileCache::class

Usage

$ php artisan cache:cleanup
$ php artisan cache:cleanup 48

where 48 is known as 48 hours, you can change the integer to suit your needs

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please raise an issue.

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments