mirror of
https://github.com/caddyserver/caddy.git
synced 2026-01-17 01:30:34 +00:00
caddytls: Reuse certificate cache through reloads (#5623)
* caddytls: Don't purge cert cache on config reload * Update CertMagic This actually avoids reloading managed certs from storage when already in the cache, d'oh. * Fix bug; re-implement HasCertificateForSubject * Update go.mod: CertMagic tag
This commit is contained in:
@@ -50,11 +50,7 @@ func (a *adminAPI) Provision(ctx caddy.Context) error {
|
||||
a.log = ctx.Logger(a) // TODO: passing in 'a' is a hack until the admin API is officially extensible (see #5032)
|
||||
|
||||
// Avoid initializing PKI if it wasn't configured
|
||||
pkiApp, err := a.ctx.AppIfConfigured("pki")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if pkiApp != nil {
|
||||
if pkiApp := a.ctx.AppIfConfigured("pki"); pkiApp != nil {
|
||||
a.pkiApp = pkiApp.(*PKI)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user