File based cache prolonger for Laravel
File based cache prolonger for Laravel.
Laravel's file cache is rather simple. When it's expired the cache file is removed. Depending on implementation this cache gets regenerated during the request.
On heavy loaded applications this means that during the time of regeneration every request bumps into empty cache file and tries to regenerate it. This gap can lead to DoS - application will stop to respond.
This package is meant to lower the risk of that. Request hits expired cache, prolongs its expiration and in the meantime tries to regenerate the cache. For the time of regeneration other threads will get old contents.
composer require desmart/laravel-cache-protract:~1.0.0
DeSmart\CacheProtract\ServiceProvider to providers.
app/config/cache.php change driver to
Optionally you can publish, and change config file.