certcache: log on actions being taken

This commit is contained in:
Cadey Ratio 2017-01-25 19:33:12 -08:00
parent a7ee9b1a06
commit 385d340027
1 changed files with 5 additions and 0 deletions

View File

@ -57,6 +57,8 @@ func (c *CertCache) Get(ctx context.Context, key string) ([]byte, error) {
body = cert.Body
}
log.Printf("certcache: fetched: %s", key)
return body, nil
}
@ -70,6 +72,8 @@ func (c *CertCache) Put(ctx context.Context, key string, data []byte) error {
Body: data,
}
log.Printf("certcache: added: %s", key)
_, err := r.Table("certs").Insert(cert).RunWrite(c.s)
return err
}
@ -79,5 +83,6 @@ func (c *CertCache) Put(ctx context.Context, key string, data []byte) error {
func (c *CertCache) Delete(ctx context.Context, key string) error {
_, err := r.Table("certs").Get(key).Delete().Run(c.s)
log.Printf("certcache: deleted: %s", key)
return err
}