pull/315/head
crapStone 2024-04-27 23:38:49 +02:00 zatwierdzone przez crapStone
rodzic 687f06e107
commit 50221cf531
2 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -33,12 +33,11 @@ func TLSConfig(mainDomainSuffix string,
giteaClient *gitea.Client,
acmeClient *AcmeClient,
firstDefaultBranch string,
challengeCache cache.ICache, canonicalDomainCache cache.ICache,
challengeCache, canonicalDomainCache cache.ICache,
certDB database.CertDB,
noDNS01 bool,
rawDomain string,
) *tls.Config {
keyCache, err := lru.New[string, tls.Certificate](32)
if err != nil {
panic(err) // This should only happen if 32 < 0 at the time of writing, which should be reason enough to panic.

Wyświetl plik

@ -8,8 +8,10 @@ import (
"github.com/hashicorp/golang-lru/v2/expirable"
)
const lookupCacheValidity = 30 * time.Second
const defaultPagesRepo = "pages"
const (
lookupCacheValidity = 30 * time.Second
defaultPagesRepo = "pages"
)
// TODO(#316): refactor to not use global variables
var lookupCache *expirable.LRU[string, string] = expirable.NewLRU[string, string](4096, nil, lookupCacheValidity)