简体   繁体   English

反应 Laravel 部署缓存问题

[英]React with Laravel deployment Cache issue

I have created an app with react and laravel, whenever made an update and deploy it, the client browser does not update the cahnges, it always load from the cache.我创建了一个带有 React 和 laravel 的应用程序,无论何时进行更新和部署,客户端浏览器都不会更新 cahnges,它总是从缓存中加载。 When I am using in an incognito window or cleared the browser cache the changes reflected.当我在隐身模式下使用 window 或清除浏览器缓存时,会反映出更改。

I have tried clearing npm cache as well as php artisan cache clean, It doesnt work out for me.我已经尝试清除 npm 缓存以及 php artisan 缓存清理,但对我来说没有用。

What should I do to clear the browser cache whenever I update the code?每当我更新代码时,我应该怎么做才能清除浏览器缓存?

Thank you in advance, Vicky提前谢谢你,维姬

Running npm run prod should re-generate assets with the proper versioning to solve the cache issue.运行npm run prod应该会重新生成具有正确版本控制的资产,以解决缓存问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM