Skip to content

momokang/laravel-clean-file-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages