Move to []byte for caching and make it compile

This commit is contained in:
Moritz Marquardt 2024-03-26 07:38:15 +01:00
parent 5b6eecc75f
commit c4181d1206
11 changed files with 63 additions and 43 deletions

View file

@ -5,6 +5,7 @@ import (
"crypto/tls"
"encoding/json"
"fmt"
"github.com/OrlovEvgeny/go-mcache"
"net"
"net/http"
"os"
@ -70,12 +71,12 @@ func Serve(ctx *cli.Context) error {
}
defer closeFn()
keyCache := cache.NewInMemoryCache()
keyCache := mcache.New()
challengeCache := cache.NewInMemoryCache()
// canonicalDomainCache stores canonical domains
canonicalDomainCache := cache.NewInMemoryCache()
// dnsLookupCache stores DNS lookups for custom domains
dnsLookupCache := cache.NewInMemoryCache()
dnsLookupCache := mcache.New()
// redirectsCache stores redirects in _redirects files
redirectsCache := cache.NewInMemoryCache()
// clientResponseCache stores responses from the Gitea server