inject all cache

This commit is contained in:
6543 2021-12-05 15:02:44 +01:00
parent 2b49039252
commit b3830e979c
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE
5 changed files with 44 additions and 25 deletions

View file

@ -5,6 +5,8 @@ import (
"github.com/valyala/fasthttp"
"testing"
"time"
"codeberg.org/codeberg/pages/server/cache"
)
func TestHandlerPerformance(t *testing.T) {
@ -16,6 +18,8 @@ func TestHandlerPerformance(t *testing.T) {
"",
[][]byte{[]byte("/.well-known/acme-challenge/")},
[][]byte{[]byte("raw.codeberg.org"), []byte("fonts.codeberg.org"), []byte("design.codeberg.org")},
cache.NewKeyValueCache(),
cache.NewKeyValueCache(),
)
ctx := &fasthttp.RequestCtx{