Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Change DoNotCache behavior to not imply SkipCache." #570

Merged
merged 1 commit into from
May 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions go/pkg/client/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ type Action struct {
//
// 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.
Expand Down Expand Up @@ -169,8 +168,8 @@ func (c *Client) PrepAction(ctx context.Context, ac *Action) (*repb.Digest, *rep
}
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 {
Expand Down
Loading