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.
()
| 44 | // ALERT: Callers in a perf-sensitive code path should call FillNarInfoCache |
| 45 | // before calling this function. |
| 46 | func (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. |
no test coverage detected