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:
parent
246aefbec4
commit
21a18eced6
|
@ -111,7 +111,7 @@ func run(c *cobra.Command, args []string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if expiry <= 0 {
|
if expiry <= 0 {
|
||||||
extraHeaders.Set("Cache-Control", "no-store")
|
extraHeaders.Set("Cache-Control", "no-cache")
|
||||||
} else {
|
} else {
|
||||||
extraHeaders.Set("Cache-Control",
|
extraHeaders.Set("Cache-Control",
|
||||||
fmt.Sprintf("public, max-age=%d", expiry/1e9))
|
fmt.Sprintf("public, max-age=%d", expiry/1e9))
|
||||||
|
|
Loading…
Reference in New Issue