cmd/packserver: use Cache-Control: no-cache

Rather than setting "Cache-Control: no-store", use "no-cache". The
difference is that "no-store" tells the browser that it must always
completely re-fetch the resource; whereas "no-cache" means that the
browser can write the resource to disk but must re-validate it (e.g.
using Etags) before re-using it.
This commit is contained in:
Laurence Withers 2019-04-25 14:47:13 +01:00
parent 246aefbec4
commit 21a18eced6
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ func run(c *cobra.Command, args []string) error {
return err
}
if expiry <= 0 {
extraHeaders.Set("Cache-Control", "no-store")
extraHeaders.Set("Cache-Control", "no-cache")
} else {
extraHeaders.Set("Cache-Control",
fmt.Sprintf("public, max-age=%d", expiry/1e9))