-
Notifications
You must be signed in to change notification settings - Fork 11.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
artisan cache:clear silently fails if cache files are not writable #1179
Comments
The |
Jason, I'm pretty sure cache:clear deletes the app/storage/cache if |
Oh yeah, it does, I totally overlooked that first line. 😉 (Still waking up!) However, the cache stores don't return a boolean for success or failure. |
Eh, just going to close this for now. Don't see it as very critical as probably isn't totally worth the time to fix at the moment. |
This just happened to me last night.
Found the issue, but don't know how to properly fix it because things need to be changed a little. Let me take you step by step on this one: The problem is when the Cache calls flush method on FileStore cache store. It then calls deleteDirectory method which just assumes that deleting files and directories from that directory went good. When in fact it didn't. This line here just ignores output from delete method which in fact tries to delete a file and return Possible solution:
Possible hiccup: I have found a contract for Store where it says that Maybe implementing this change would mean that other cache stores would need to implement boolean as a return value on flush method. What do you think? |
i'm having the same issue right now @davejamesmiller did you manage to solve the issue? |
@jfelipeara Yeah I just fix the file permissions or delete the files manually, e.g. using These days I use |
@davejamesmiller Well I ran through the same problem and stumbled upon this issue through google. Tried the cache:clear with |
I just ran into this issue with 5.5. I don't understand @taylorotwell's reasoning behind closing the issue. If a tool isn't doing what it says it does, then it really shouldn't return a success message. Seems pretty critical to me. |
In 5.5. ran into the same issue. Even Even though |
Using the "file" cache driver, my cache files are owned by the web server user (
www-data
) and not writable by me, butartisan cache:clear
still says "Application cache cleared!", giving no indication that it actually failed.The text was updated successfully, but these errors were encountered: