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

Github Cache Eviction Policy #3226

Closed

Conversation

WeiqunZhang
Copy link
Member

@WeiqunZhang WeiqunZhang commented Mar 29, 2023

After a workflow finishes, delete all old caches associated with it.

Add an action to delete caches associated with a PR upon the close of the PR.

Use variables in the github context as part of the cache key names instead of manually repeating.

This is how cache works now. There is a cache file for the default branch (i.e., development). When
a PR is submitted, the main cache file is checked out to be used by the PR. When the PR finishes
the CIs, a copy of the cache including any updates will be saved. This cache has a scope associated
with the PR. Another PR will be be able to access it. If the author pushes an update to the BR branch,
The new CIs will run using the latest PR cache and it will evict old cache in the PR. When the PR is
merged, its cache will be deleted. The development branch's workflow will generate the latest main
cache.

After a workflow finishes, delete all old caches associated with it.

Add an action to delete caches associated with a PR upon the close of the
PR.

Use variables in github context as part of the cache key names instead of
manually repeating.
@WeiqunZhang
Copy link
Member Author

This won't work because of the lack of write permission.

@ax3l
Copy link
Member

ax3l commented Mar 30, 2023

Argh

@WeiqunZhang WeiqunZhang deleted the gh_cache_eviction branch March 30, 2023 22:16
@WeiqunZhang
Copy link
Member Author

This is now implemented in #3229 with a different approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants