1
0
mirror of https://github.com/golang/go synced 2024-11-05 16:06:10 -07:00

godoc: use Google’s CDN edge cache to serve downloads

This increases reliability and performance of downloads
across locales.

Change-Id: I619f986496dea57e1ee5e8150e31b2a6f8d8dde7
Reviewed-on: https://go-review.googlesource.com/60090
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
This commit is contained in:
Andrew Bonventre 2017-08-29 17:31:23 -04:00
parent 3b1faeda9a
commit aebcdfcd02

View File

@ -35,7 +35,7 @@ import (
)
const (
gcsBaseURL = "https://storage.googleapis.com/golang/"
edgeCacheBaseURL = "https://redirector.gvt1.com/edgedl/go/"
cacheKey = "download_list_3" // increment if listTemplateData changes
cacheDuration = time.Hour
)
@ -133,7 +133,7 @@ func (f File) Highlight() bool {
}
func (f File) URL() string {
return gcsBaseURL + f.Filename
return edgeCacheBaseURL + f.Filename
}
type Release struct {