0

I am using php artisan serve to start my mini app on my remote server.

Once I update code, I am using ftp to upload new code.

After upload I am stop and restart (php artisan serve), but view are still "old", there is something like cache, how can I clear it?

  • `php artisan cache:clear` `php artisan config:clear` then clear the view `php artisan view:clear` – STA Aug 25 '20 at 18:22
  • Doesnt work, still it same –  Aug 25 '20 at 18:24
  • What's you have cahnged in your app? – STA Aug 25 '20 at 18:25
  • I changed vue js files –  Aug 25 '20 at 18:29
  • Then its may be cached by your CDN. If so, then you need to be waited or purge the cache from your CDN – STA Aug 25 '20 at 18:30
  • Do you mean my provider CDN or sometinh like this ? I dont have any cdn I just have cloudflare free version. –  Aug 25 '20 at 18:34
  • If you are using cloudflare, then you are using [tag:CloudFlare] CDN too (including free version). Go to your CloudFlare panel, select your site and go to `Caching` -> `Configuration` then `Purge Everything`. It will purge your all current cache files, now clear cache from your browser and access your site. If you don't want to purge manually. Then you need to be waited some hour (max 24 hour) – STA Aug 25 '20 at 18:39

2 Answers2

1

try php artisan optimize:clear

Kongulov
  • 1,156
  • 2
  • 9
  • 19
0

If You want to clear file cache then you can use clearstatcache().If you are checking a file several times in a script, to avoid caching & to get correct results, use the clearstatcache() function. see more here



But if you want clear browser cache then you can delete it using headers. see more here

userbloom
  • 153
  • 1
  • 11