質問

I am creating a http client cache, but I have a doubt about the no-cache field.

Official documentation says:

If the no-cache directive does not specify a field-name, then a cache MUST NOT use the response to satisfy a subsequent request without successful revalidation with the origin server. [...]

If the no-cache directive does specify one or more field-names, then a cache MAY use the response to satisfy a subsequent request, subject to any other restrictions on caching. However, the specified field-name(s) MUST NOT be sent in the response to a subsequent request without successful revalidation with the origin server.

My question is: how can I revalidate just those fields without revalidating the whole response?

役に立ちましたか?

解決

You should send a conditional request to the origin server and use the returned (header) fields when you get a 304 Not Modified

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top