(ctx context.Context)
| 320 | var nixCacheIsConfigured = goutil.OnceValueWithContext(nixcache.IsConfigured) |
| 321 | |
| 322 | func readCaches(ctx context.Context) ([]string, error) { |
| 323 | cacheURIs := []string{binaryCache} |
| 324 | if !nixCacheIsConfigured.Do(ctx) { |
| 325 | return cacheURIs, nil |
| 326 | } |
| 327 | |
| 328 | otherCaches, err := nixcache.CachedReadCaches(ctx) |
| 329 | if err != nil { |
| 330 | return nil, err |
| 331 | } |
| 332 | for _, c := range otherCaches { |
| 333 | cacheURIs = append(cacheURIs, c.GetUri()) |
| 334 | } |
| 335 | return cacheURIs, nil |
| 336 | } |
| 337 | |
| 338 | func ClearNarInfoCache() { |
| 339 | narInfoStatusFnCache = sync.Map{} |
no test coverage detected