MCPcopy Index your code
hub / github.com/jetify-com/devbox / IsInBinaryCache

Method IsInBinaryCache

internal/devpkg/narinfo_cache.go:46–54  ·  view source on GitHub ↗

IsInBinaryCache returns true if the package is in the binary cache. ALERT: Callers in a perf-sensitive code path should call FillNarInfoCache before calling this function.

()

Source from the content-addressed store, hash-verified

44// ALERT: Callers in a perf-sensitive code path should call FillNarInfoCache
45// before calling this function.
46func (p *Package) IsInBinaryCache() (bool, error) {
47 if eligible, err := p.isEligibleForBinaryCache(); err != nil {
48 return false, err
49 } else if !eligible {
50 return false, nil
51 }
52
53 return p.areExpectedOutputsInCacheOnce(useDefaultOutputs)
54}
55
56// FillNarInfoCache checks the remote binary cache for the narinfo of each
57// package in the list, and caches the result.

Callers 8

InputAddressedPathsMethod · 0.95
ValidateExistsMethod · 0.95
ProfileListNameOrIndexFunction · 0.80
flakeInputsFunction · 0.80
addOutputMethod · 0.80

Tested by

no test coverage detected