func (c *Cache) Warmup() {
	secrets, ok := c.backend.SecretList()
	if ok {
		for _, backendSecret := range secrets {
			c.secretMap.Put(backendSecret.Name, backendSecret, time.Time{})
		}
	} else {
		c.Warnf("Failed to warmup cache on startup")
	}
}
Warmup reads the secret list from the backend to prime the cache.
Should only be called after creating a new cache on startup.
package main
import (
	"time"
	"github.com/square/keywhiz-fs/log"
)
type SecretBackend interface {
	Secret(string) (secret *Secret, err error)
	SecretList() (secretList []Secret, ok bool)
}
type Timeouts struct {
	Fresh time.Duration
	BackendDeadline time.Duration
	MaxWait         time.Duration
	DeletionDelay time.Duration
}
type Cache struct {
	*log.Logger
	secretMap *SecretMap
	backend   SecretBackend
	timeouts  Timeouts
	now       func() time.Time
}
type secretResult struct {
	secret *Secret
	err    error
}
func NewCache(backend SecretBackend, timeouts Timeouts, logConfig log.Config, now func() time.Time) *Cache {
	logger := log.New("kwfs_cache", logConfig)
	return &Cache{logger, NewSecretMap(timeouts, now), backend, timeouts, now}
}