Closed jstastny closed 4 years ago
An example of endpoint, which should be cacheable according to Google is https://www.googleapis.com/oauth2/v1/certs
Is has to following headers:
alt-svc: quic=":443"; ma=2592000; v="44,43,39,35"
cache-control: public, max-age=23880, must-revalidate, no-transform
content-encoding: gzip
content-length: 1563
content-type: application/json; charset=UTF-8
date: Fri, 16 Nov 2018 21:20:40 GMT
expires: Sat, 17 Nov 2018 03:58:40 GMT
server: ESF
status: 200
vary: Origin
vary: X-Origin
vary: Referer
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
must-revalidate
directive seems to be treated same asno-cache
in the code: https://github.com/plataformatec/faraday-http-cache/blob/02274d8639f80ec3821d8efa9a824213882443ab/lib/faraday/http_cache/response.rb#L53This does not seem to be in line with what the MDN Documentation says:
The way I understand it, the important word here is the "stale", which is the difference between this and the
no-cache
. This SO gives a nice discussion, coming to the same conclusion: https://stackoverflow.com/questions/18148884/difference-between-no-cache-and-must-revalidate