Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用功能标志(Azure 应用程序配置),在 React 方面,我遵循了本指南,指示如何使用信息。
但是,为获取功能信息而发出的 GET 请求的响应被缓存在浏览器中,这让我无法显示功能的真实当前状态。
我被告知没有任何方法可以在 Azure 端进行配置,因此唯一的解决方案是忽略Expires:orCache-Control: max-age标头。
Expires:
Cache-Control: max-age
有没有办法从前端视图做到这一点?我正在使用 React。
提前致谢!
@Merlin,不建议在客户端反应应用程序中使用连接字符串。这是来自 Azure 应用配置服务的建议。您还可以通过这种方式更好地控制缓存行为。
https://docs.microsoft.com/en-us/azure/azure-app-configuration/howto-best-practices#client-applications-in-app-configuration