(generation uint64, config codersdk.AdvisorConfig)
| 505 | } |
| 506 | |
| 507 | func (c *chatConfigCache) storeAdvisorConfig(generation uint64, config codersdk.AdvisorConfig) { |
| 508 | c.mu.Lock() |
| 509 | defer c.mu.Unlock() |
| 510 | |
| 511 | if c.advisorConfigGeneration != generation { |
| 512 | return |
| 513 | } |
| 514 | |
| 515 | c.advisorConfig = &cachedAdvisorConfig{ |
| 516 | config: config, |
| 517 | expiresAt: c.clock.Now().Add(chatConfigAdvisorConfigTTL), |
| 518 | } |
| 519 | } |
no test coverage detected