Reputation: 42
I'm using a Mac. Can not execute the command
php artisan cache:clear
I get in return:
Failed to clear cache. Make sure you have the proper permissions.
This is for Laravel. Any ideas how to fix this?
Upvotes: 0
Views: 7606
Reputation:
This could be one of several things(need more information to narrow it down):
Expansion on points 1 and 2:
This is normal behavior. If you have opened pages expecting them to be cached and they are not, split the page and utilize @include
directives splitting out the dynamic and static elements of the page into separate blade files.
I like to add my user to the same group as the web server's group(www). Then change the group for all of the files to www, with group read permissions, and write permissions only on the bootstrap/cache
and storage
directories.
Upvotes: 2
Reputation: 3030
I think it might possibly be a bug with the latest version of Laravel, however unlikely it may seem. I started a new project today and installed a fresh copy of Laravel 5.7 and it seems to cause the error above. However, if I use 5.6 then the error does not appear.
Upvotes: 1