From aebcdfcd021159d208f37cb89f7cbbf6bc3bf619 Mon Sep 17 00:00:00 2001 From: Andrew Bonventre Date: Tue, 29 Aug 2017 17:31:23 -0400 Subject: [PATCH] =?UTF-8?q?godoc:=20use=20Google=E2=80=99s=20CDN=20edge=20?= =?UTF-8?q?cache=20to=20serve=20downloads?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This increases reliability and performance of downloads across locales. Change-Id: I619f986496dea57e1ee5e8150e31b2a6f8d8dde7 Reviewed-on: https://go-review.googlesource.com/60090 Reviewed-by: Chris Broadfoot Reviewed-by: Andrew Bonventre --- godoc/dl/dl.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/godoc/dl/dl.go b/godoc/dl/dl.go index 3d2f6c46d8..e9b38c1596 100644 --- a/godoc/dl/dl.go +++ b/godoc/dl/dl.go @@ -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 {