mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-01-19 08:57:55 +00:00
next
This commit is contained in:
parent
2d3be9dc2c
commit
d669cc208f
2 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,7 @@ func Serve(ctx *cli.Context) error {
|
||||||
// TODO: make this an MRU cache with a size limit
|
// TODO: make this an MRU cache with a size limit
|
||||||
fileResponseCache := cache.NewKeyValueCache()
|
fileResponseCache := cache.NewKeyValueCache()
|
||||||
|
|
||||||
giteaClient, err := gitea.NewClient(giteaRoot, giteaAPIToken)
|
giteaClient, err := gitea.NewClient(giteaRoot, giteaAPIToken, fileResponseCache)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not create new gitea client: %v", err)
|
return fmt.Errorf("could not create new gitea client: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ import (
|
||||||
|
|
||||||
func TestHandlerPerformance(t *testing.T) {
|
func TestHandlerPerformance(t *testing.T) {
|
||||||
giteaRoot := "https://codeberg.org"
|
giteaRoot := "https://codeberg.org"
|
||||||
giteaClient, _ := gitea.NewClient(giteaRoot, "")
|
giteaClient, _ := gitea.NewClient(giteaRoot, "", cache.NewKeyValueCache())
|
||||||
testHandler := Handler(
|
testHandler := Handler(
|
||||||
[]byte("codeberg.page"), []byte("raw.codeberg.org"),
|
[]byte("codeberg.page"), []byte("raw.codeberg.org"),
|
||||||
giteaClient,
|
giteaClient,
|
||||||
|
|
Loading…
Reference in a new issue