Permalink
Browse files

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>
  • Loading branch information...
andybons committed Aug 29, 2017
1 parent 3b1faed commit aebcdfcd021159d208f37cb89f7cbbf6bc3bf619
Showing with 4 additions and 4 deletions.
  1. +4 −4 godoc/dl/dl.go
View
@@ -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 {

0 comments on commit aebcdfc

Please sign in to comment.