gpt4 book ai didi

http - 可以在相同的资源 uri 上缓存 Etags 吗?

转载 作者:塔克拉玛干 更新时间:2023-11-01 19:09:40 25 4
gpt4 key购买 nike

我的根 url ('/') 根据您是否登录返回不同的内容。

这个 url 仍然可以使用 etags 吗?将登录内容托管在不同的 url 上会更容易吗?

最佳答案

您可以使用两个不同的 ETag 交付资源。请求可以在 If-None-Match 中包含两个标签.然后您可以决定缓存的实体是否有效并告诉客户端显示哪个:

If any of the entity tags match [..] then the server MUST NOT perform the requested method [..]. Instead, if the request method was GET or HEAD, the server SHOULD respond with a 304 (Not Modified) response, including the cache- related header fields (particularly ETag) of one of the entities that matched.

关于http - 可以在相同的资源 uri 上缓存 Etags 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20733060/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com