Difference between no-cache and must-revalidate

前端 未结 4 956
时光说笑
时光说笑 2020-11-28 17:50

From the RFC 2616

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1

no-cache

If the no-cache directive does not spe

4条回答
  •  [愿得一人]
    2020-11-28 18:37

    I believe that must-revalidate means :

    Once the cache expires, refuse to return stale responses to the user even if they say that stale responses are acceptable.

    Whereas no-cache implies :

    must-revalidate plus the fact the response becomes stale right away.

    If a response is cacheable for 10 seconds, then must-revalidate kicks in after 10 seconds, whereas no-cache implies must-revalidate after 0 seconds.

    At least, that's my interpretation.

提交回复
热议问题