MCPcopy Index your code
hub / github.com/coder/coder / cache

Struct cache

coderd/cryptokeys/cache.go:79–94  ·  view source on GitHub ↗

cache implements the caching functionality for both signing and encryption keys.

Source from the content-addressed store, hash-verified

77
78// cache implements the caching functionality for both signing and encryption keys.
79type cache struct {
80 ctx context.Context
81 cancel context.CancelFunc
82 clock quartz.Clock
83 fetcher Fetcher
84 logger slog.Logger
85 feature codersdk.CryptoKeyFeature
86
87 mu sync.Mutex
88 keys map[int32]codersdk.CryptoKey
89 lastFetch time.Time
90 refresher *quartz.Timer
91 fetching bool
92 closed bool
93 cond *sync.Cond
94}
95
96type CacheOption func(*cache)
97

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected