mirror of
https://github.com/golang/go
synced 2024-11-05 11:46:12 -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:
parent
3b1faeda9a
commit
aebcdfcd02
@ -35,9 +35,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
gcsBaseURL = "https://storage.googleapis.com/golang/"
|
||||
cacheKey = "download_list_3" // increment if listTemplateData changes
|
||||
cacheDuration = time.Hour
|
||||
edgeCacheBaseURL = "https://redirector.gvt1.com/edgedl/go/"
|
||||
cacheKey = "download_list_3" // increment if listTemplateData changes
|
||||
cacheDuration = time.Hour
|
||||
)
|
||||
|
||||
func RegisterHandlers(mux *http.ServeMux) {
|
||||
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user