G.Baghashvili
G.Baghashvili

Reputation: 220

Laravel clear file cache

I have changed file in Laravel public folder, but when I try to download using link, it downloads old file. I have tried:

php artisan cache:clear

php artisan route:cache

php artisan view:clear

php artisan config:cache

But without any success. Can someone help me?

Upvotes: 0

Views: 4191

Answers (3)

BrainOverflow
BrainOverflow

Reputation: 11

If you´re using artisan as server try to stop and restart it. Also you should try to reload the page by CTRL + F5 or CTRL + SHIFT + R which ignores the local browser cache.

Upvotes: 0

meph
meph

Reputation: 209

It's because of your browser cache not blade cache.

Add a random number or better than that, the current time after the download links. like:

return $download_links . '?' . time();

Upvotes: 0

user931018
user931018

Reputation: 703

It might be your browser that's caching the file. Try download it again in a different browser or try in Incognito or Private Browsing mode to test it. I've had this same thing happen to me today actually and turns out the browser cached the file and kept reloading that file even after it was deleted from the server!

Upvotes: 5

Related Questions