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

Method storeProviders

coderd/x/chatd/configcache.go:191–203  ·  view source on GitHub ↗
(generation uint64, providers []database.AIProvider)

Source from the content-addressed store, hash-verified

189}
190
191func (c *chatConfigCache) storeProviders(generation uint64, providers []database.AIProvider) {
192 c.mu.Lock()
193 defer c.mu.Unlock()
194
195 if c.providerGeneration != generation {
196 return
197 }
198
199 c.providers = &cachedProviders{
200 providers: slices.Clone(providers),
201 expiresAt: c.clock.Now().Add(chatConfigProvidersTTL),
202 }
203}
204
205func (c *chatConfigCache) InvalidateProviders() {
206 c.mu.Lock()

Callers 1

EnabledProvidersMethod · 0.95

Calls 4

AddMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45
CloneMethod · 0.45

Tested by

no test coverage detected