Closed iarna closed 7 years ago
this has been deployed =) we may have to slowly purge all of the documents as headers aren't refreshed if we 304 on the backend response from the cache miss.
@soldair I'm still not seeing it:
$ lwp-request -dE https://registry.npmjs.org/npm
GET https://registry.npmjs.org/npm
User-Agent: lwp-request/6.15 libwww-perl/6.15
200 OK
Cache-Control: max-age=300
Connection: close
Date: Sat, 08 Jul 2017 22:43:48 GMT
Via: 1.1 varnish
Accept-Ranges: bytes
ETag: "595d9b1f-646cda"
Server: nginx/1.10.1
Vary: Accept-Encoding
Content-Length: 6581466
Content-Type: application/json
Last-Modified: Thu, 06 Jul 2017 02:06:23 GMT
Client-Date: Sat, 08 Jul 2017 22:43:47 GMT
Client-Peer: 151.101.40.162:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=BE/O=GlobalSign nv-sa/CN=GlobalSign Extended Validation CA - SHA256 - G2
Client-SSL-Cert-Subject: /businessCategory=Private Organization/serialNumber=5452409/jurisdictionC=US/jurisdictionST=Delaware/C=US/ST=California/L=Oakland/street=1999 Harrison Street Suite 1150/O=npm, Inc./CN=npmjs.org
Client-SSL-Cipher: ECDHE-RSA-AES128-GCM-SHA256
Client-SSL-Socket-Class: IO::Socket::SSL
X-Cache: HIT
X-Cache-Hits: 0
X-Served-By: cache-sjc3635-SJC
X-Timer: S1499553828.412598,VS0,VE23
Vary: Accept-Encoding
So I'm assuming this is due to the need to cache purge?
Ah yeah, I do see it for cache misses.
So yeah, this won't be useful to us until the cache is refreshed.
Everything looks good now!
The
Vary
header is currently set toAccept-Encoding
and I believe it needs to beAccept-Encoding, Accept
because we do vary content on the basis of theAccept
header (when deciding to serve corgis or not.)