-
Notifications
You must be signed in to change notification settings - Fork 7
Too aggressive cache control #37
Description
The cacheing on the site is set quite high, it looks like all content is stored the browser for over a week. Don't know what would be optimal. Currently the pages needs a hard reload in order for users to see new content.
I think at least for the root https://napalm-automation.net and https://napalm-automation.net/news it could be set a lot lower. Users shouldn't need to use Command (or Control) + R to see new posts. For things under /assets it could be set a lot higher, especially for javascript and css as there's some kind of cache busting when needed for those (https://github.com/napalm-automation/napalm-automation.github.io/blob/master/_data/cache.yml)
What options do we have to set different expirations to different sections of the site?
~ ᐅ curl -svo /dev/null https://napalm-automation.net
* Rebuilt URL to: https://napalm-automation.net/
* Trying 104.20.63.104...
* TCP_NODELAY set
* Connected to napalm-automation.net (104.20.63.104) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
* Server certificate: ssl748784.cloudflaressl.com
* Server certificate: COMODO ECC Domain Validation Secure Server CA 2
* Server certificate: COMODO ECC Certification Authority
> GET / HTTP/1.1
> Host: napalm-automation.net
> User-Agent: curl/7.51.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Fri, 21 Jul 2017 05:16:50 GMT
< Content-Type: text/html; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Set-Cookie: __cfduid=d396ffb03b2775cd7d74cc2b222c2141f1500614210; expires=Sat, 21-Jul-18 05:16:50 GMT; path=/; domain=.napalm-automation.net; HttpOnly
< Last-Modified: Thu, 20 Jul 2017 19:04:10 GMT
< Access-Control-Allow-Origin: *
< Expires: Sat, 29 Jul 2017 05:16:50 GMT
< Cache-Control: public, max-age=691200
< X-GitHub-Request-Id: F276:6626:32F3F79:45A84F9:59710412
< Via: 1.1 varnish
< X-Served-By: cache-bma7034-BMA
< X-Cache: MISS
< X-Cache-Hits: 0
< X-Timer: S1500578835.855828,VS0,VE111
< Vary: Accept-Encoding
< X-Fastly-Request-ID: 00770c5b53f14a4f05e648d3d54c16f36c5357dc
< CF-Cache-Status: HIT
< Server: cloudflare-nginx
< CF-RAY: 381bb0c26d353d31-CPH
<
{ [570 bytes data]
* Curl_http_done: called premature == 0
* Connection #0 to host napalm-automation.net left intact
~ ᐅ