This commit is contained in:
6543 2022-05-10 20:55:13 +02:00
parent 5ecb63426f
commit 1bb6e09e23
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE

View file

@ -1,7 +1,6 @@
package database package database
import ( import (
"context"
"fmt" "fmt"
"time" "time"
@ -13,7 +12,6 @@ import (
var _ CertDB = tmpDB{} var _ CertDB = tmpDB{}
type tmpDB struct { type tmpDB struct {
ctx context.Context
intern *mcache.CacheDriver intern *mcache.CacheDriver
ttl time.Duration ttl time.Duration
} }
@ -24,8 +22,7 @@ func (p tmpDB) Close() error {
} }
func (p tmpDB) Put(name string, cert *certificate.Resource) error { func (p tmpDB) Put(name string, cert *certificate.Resource) error {
p.intern.Set(name, cert, p.ttl) return p.intern.Set(name, cert, p.ttl)
return nil
} }
func (p tmpDB) Get(name string) (*certificate.Resource, error) { func (p tmpDB) Get(name string) (*certificate.Resource, error) {