lundi 7 août 2017

Laravel 5.4 - php artisan cache:clear does not clear cache files when using 'file' cache driver

Laravel 5.4 app. CACHE_DRIVER is set to file and QUEUE_DRIVER is set to sync in .env.

When I run php artisan cache:clear It says Cache cleared successfully yet I still have 236K of files in my storage/framework/cache directory.

Frustrated by this, I also manually deleted all files/directories under storage/framework/cache using rm -rf * from that directory.

Now, when I run art queue:restart I get [ErrorException] file_put_contents(/var/www/vhosts/http://ift.tt/2ujHbjd
f3a2ed2c09a1807ffa6c90): failed to open stream: No such file or directory

So, I have two problems on my hands. First is: why aren't all the cache files deleted by Artisan? How do I safely delete them? Second problem is: how do I recover from this so that php artisan queue:restart doesn't error out on me?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire