Selaa lähdekoodia

Use the cache

This makes requests following the initial one *much* faster.
Lucas Stadler 8 vuotta sitten
vanhempi
commit
77c8ac593c
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      quit.go

+ 2 - 1
quit.go

@ -39,6 +39,7 @@ func main() {
39 39
		log.Fatal("opening repository: ", err)
40 40
	}
41 41
42
	fancyRepo := NewFancyRepo(repo)
42 43
	http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
43 44
		performance.MeasureRequest(req)
44 45
@ -46,7 +47,7 @@ func main() {
46 47
		start := time.Now()
47 48
		err = repoTmpl.Execute(buf, map[string]interface{}{
48 49
			"RepoPath":    path.Base(repoPath),
49
			"Repo":        NewFancyRepo(repo),
50
			"Repo":        fancyRepo,
50 51
			"Style":       template.CSS(repoStyle),
51 52
			"Performance": performance.Render(req),
52 53
		})