solver: fix early resolution of cache-fast deps

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
docker-18.09
Tonis Tiigi 2018-09-26 18:24:55 -07:00
parent 66fcbd1258
commit a711fbb8f3
1 changed files with 1 additions and 1 deletions

View File

@ -271,7 +271,7 @@ func (e *edge) currentIndexKey() *CacheKey {
func (e *edge) skipPhase2SlowCache(dep *dep) bool {
isPhase1 := false
for _, dep := range e.deps {
if !dep.slowCacheComplete && e.slowCacheFunc(dep) != nil && len(dep.keyMap) == 0 {
if (!dep.slowCacheComplete && e.slowCacheFunc(dep) != nil || dep.state < edgeStatusCacheSlow) && len(dep.keyMap) == 0 {
isPhase1 = true
break
}