-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
refactor: improve branch cache logic #17538
refactor: improve branch cache logic #17538
Conversation
- shift git-conflict to branch cache - invalidate cached values when SHAs change (not central)
Co-authored-by: Rhys Arkins <[email protected]>
Current Flow:
Note:
not creating new branchCache here because if we wanted cache we would have done so before processing branch |
I made a tiny modification:
Will revert if you also think that it makes the code appear more complicated and less readable. Aside from the two concerns:
I believe the implementation is in line with what you requested in the (#17663) 🤞. I tested it on repos, and it works as intended. |
I think there's no harm in "writing" to the branch cache during a run even when cache is disabled as long as the cache file itself isn't written out at the end. We can simply think of it as branch state, which either gets written to cache if enabled or discarded. |
New updates:
Minimal BranchCache:
After that we continue with : syncBranchCache -> processBranch -> if new commit --> setBranchCommit() Note:
|
Dividing this PR into smaller PRs. |
Context
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: