MCPcopy
hub / github.com/jetify-com/devbox / isEligibleForBinaryCache

Method isEligibleForBinaryCache

internal/devpkg/narinfo_cache.go:212–223  ·  view source on GitHub ↗

isEligibleForBinaryCache returns true if we have additional metadata about the package to query it from the binary cache.

()

Source from the content-addressed store, hash-verified

210// isEligibleForBinaryCache returns true if we have additional metadata about
211// the package to query it from the binary cache.
212func (p *Package) isEligibleForBinaryCache() (bool, error) {
213 defer debug.FunctionTimer().End()
214 // Patched packages are not in the binary cache.
215 if p.Patch {
216 return false, nil
217 }
218 sysInfo, err := p.sysInfoIfExists()
219 if err != nil {
220 return false, err
221 }
222 return sysInfo != nil, nil
223}
224
225// sysInfoIfExists returns the system info for the user's system. If the sysInfo
226// is missing, then nil is returned

Callers 4

GetOutputsWithCacheMethod · 0.95
IsOutputInBinaryCacheMethod · 0.95
IsInBinaryCacheMethod · 0.95
FillNarInfoCacheFunction · 0.80

Calls 3

sysInfoIfExistsMethod · 0.95
FunctionTimerFunction · 0.92
EndMethod · 0.80

Tested by

no test coverage detected