Revert "Change DoNotCache behavior to not imply SkipCache. (#565)" This reverts commit 369e1caf95ac48b9b25f4b1374adce01b0f9c088.
diff --git a/go/pkg/client/exec.go b/go/pkg/client/exec.go index a997cc7..ce0f51f 100644 --- a/go/pkg/client/exec.go +++ b/go/pkg/client/exec.go
@@ -50,9 +50,8 @@ // // If 0, the server's default timeout is used. Timeout time.Duration - // DoNotCache, if true, indicates that the result of this action should never be cached. However, - // if the action is already cached, this doesn't prevent accepting the cache entry. Use SkipCache - // to not accept a cache hit. + // DoNotCache, if true, indicates that the result of this action should never be cached. It + // implies SkipCache. DoNotCache bool // SkipCache, if true, indicates that this action should be executed even if there is a copy of // its result in the action cache that could be used instead. @@ -169,8 +168,8 @@ } acDg := digest.NewFromBlob(acBlob).ToProto() - // If cache checking is allowed, check if the action is already in the cache. - if !ac.SkipCache { + // If the result is cacheable, check if it's already in the cache. + if !ac.DoNotCache || !ac.SkipCache { log.V(1).Info("Checking cache") res, err := c.CheckActionCache(ctx, acDg) if err != nil {