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

Update cache: add getCacheEntry to check if a cache entry exists without having to download #659

Closed
wants to merge 2 commits into from

Conversation

MartijnHols
Copy link

@MartijnHols MartijnHols commented Dec 2, 2020

This adds a getCacheEntry export to the cache package that can be used to determine if a cache entry exists. When merged, this method can be used to add a flag to the the cache-action to only check if a cache entry exists for a key. Its cache-hit output can then by used to speed up workflows that use big caches and to skip work if the result of the work is already in the cache.

For context: I am using the cache action to share my build across workflow steps. If the build already exists, there is no point downloading it or building it again and the later steps can just reuse the old cached result.

Provides a way to determine if the cache exists without being required to download it. This can be used to skip jobs given that the result is already cached.
MartijnHols added a commit to MartijnHols/actions-cache that referenced this pull request Dec 2, 2020
Necessary until actions/toolkit#659 is merged, then @actions/cache needs to be updated to ^1.1.0 and this can be removed.
MartijnHols added a commit to MartijnHols/actions-cache that referenced this pull request Dec 2, 2020
Necessary until actions/toolkit#659 is merged, then @actions/cache needs to be updated to ^1.1.0 and this can be removed.
@thboop thboop added the cache label Apr 29, 2021
@MartijnHols MartijnHols closed this Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants