admin管理员组文章数量:1336632
We have encountered a strange error in one of our projects. On our live server one GET request suddenly started to always return an empty value. On our test server everything worked fine.
We found out that some npm packages were cached on the test server. After clearing that the same behaviour started there.
We noticed that the issue is caused by the hydration feature of Angular Universal, that returns the responses of GET request made on the server to the client. Usually this worked fine, so the first request in the browser returned the cached value and the second request to the same url in the browser made an actual request to the API again. But somehow this does not seem to work anymore. Now always the same cached response is returned even when it's the third or fourth request. We used Angular 15 and updated to 16 but it still doesn't seem to work. I also excluded all external libraries but had no luck.
Does anyone know how this can be analyzed or what can be the problem? I read something about that the cached value is returned as long as the app is not "stable".
本文标签: server side renderingAngular Universal Hydration HttpTransferState always using cacheStack Overflow
版权声明:本文标题:server side rendering - Angular Universal Hydration HttpTransferState always using cache - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742412384a2470043.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论