什么是“相反”?请求序列化调用?

发布于 2024-08-29 18:57:08 字数 159 浏览 3 评论 0原文

例如,如果对资源发出请求,并且在第一个请求返回结果之前发出另一个相同的请求,则服务器也会为第二个请求返回第一个请求的结果。这是为了避免对资源进行不必要的处理。这与缓存/记忆不同,因为它只涉及并行进行的相同请求。

是否有一个术语可以重复使用当前正在进行的资源请求的结果以最大程度地减少处理?

For example, if a request is made to a resource and another identical request is made before the first has returned a result, the server returns the result of the first request for the second request as well. This to avoid unnecessary processing on the resource. This is not the same thing as caching/memoization since it only concerns identical requests ongoing in parallel.

Is there a term for the reuse of results for currently ongoing requests to a resource for the purpose of minimizing processing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

过期情话 2024-09-05 18:57:08

这实际上只是缓存/记忆化,有一些限制 - 有些人可能称之为结果重用。

That's really just caching/memoization , with a few restrictions - some might call it result-reuse.

我很OK 2024-09-05 18:57:08

我称之为请求捎带。

I call it request piggybacking.

江挽川 2024-09-05 18:57:08

如果您将请求排队,等待资源的代码可以检查队列以查看是否有任何相同的待处理请求,并以某种方式为该请求返回相同的资源。

你做过任何分析吗?我敢打赌这比它的价值要多得多的工作。

If you queue up your requests, the code waiting for the resource can examine the queue to see if there are any identical requests pending and somehow return the same resource for that one too.

Have you done any profiling? I'd bet this is way more work than it is worth.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文