This commit is contained in:
6543 2022-07-15 18:56:20 +02:00
parent 2d3be9dc2c
commit d669cc208f
2 changed files with 2 additions and 2 deletions

View file

@ -82,7 +82,7 @@ func Serve(ctx *cli.Context) error {
// TODO: make this an MRU cache with a size limit
fileResponseCache := cache.NewKeyValueCache()
giteaClient, err := gitea.NewClient(giteaRoot, giteaAPIToken)
giteaClient, err := gitea.NewClient(giteaRoot, giteaAPIToken, fileResponseCache)
if err != nil {
return fmt.Errorf("could not create new gitea client: %v", err)
}

View file

@ -15,7 +15,7 @@ import (
func TestHandlerPerformance(t *testing.T) {
giteaRoot := "https://codeberg.org"
giteaClient, _ := gitea.NewClient(giteaRoot, "")
giteaClient, _ := gitea.NewClient(giteaRoot, "", cache.NewKeyValueCache())
testHandler := Handler(
[]byte("codeberg.page"), []byte("raw.codeberg.org"),
giteaClient,