(generation uint64, providers []database.AIProvider)
| 189 | } |
| 190 | |
| 191 | func (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 | |
| 205 | func (c *chatConfigCache) InvalidateProviders() { |
| 206 | c.mu.Lock() |
no test coverage detected