Restructure cache key paths and add strategy to graph key#92
Merged
Conversation
xytan0056
commented
May 29, 2026
| // requests), so neither requestOptions nor the computation strategy is part | ||
| // of this key. | ||
| func GetTreehashCachePath(buildDescription *tangopb.BuildDescription) string { | ||
| return filepath.Join("treehash", ToShortRemote(buildDescription.Remote), fmt.Sprintf("treehash-map-%s", buildDescription.BaseSha), GetReqsHash(buildDescription.Requests)) + "-" + buildDescription.Strategy.String() |
Contributor
Author
There was a problem hiding this comment.
there's no need to have strategy to identify treehash, which should be uniquely determined by base+ urls
yushan8
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous cache key layout had inconsistencies that made the on-disk cache hard to browse and audit.
Reorganize cache key layout to be per-remote, then per-category**, withexplicit suffix labels:
<remote>/graphs/<treehash>/<strategy>[_requests-options-<md5>]<remote>/treehashes/base-sha-<sha>[_request-urls-<md5>]<remote>/compared-targets/<h1>_<h2>[_requests-options-<md5>]<remote>/compared-targets-and-edges/<h1>_<h2>[_requests-options-<md5>]