Skip to content

Introduce paths input to support multiple cache paths#180

Closed
kiprasmel wants to merge 4 commits intoactions:masterfrom
kiprasmel:sarpik/support-multiple-cache-paths
Closed

Introduce paths input to support multiple cache paths#180
kiprasmel wants to merge 4 commits intoactions:masterfrom
kiprasmel:sarpik/support-multiple-cache-paths

Conversation

@kiprasmel
Copy link
Copy Markdown
Contributor

@kiprasmel kiprasmel commented Feb 6, 2020

Fixes #16


TODO - actually restore the cache from the multiple paths.

I'm a little not sure about the getCacheEntry function @ cacheHttpClient.ts - see https://github.com/actions/cache/blob/master/src/cacheHttpClient.ts#L86-L88:

couldn't there be a case that the response is an Array<ArtifactCacheEntry>, since we would've saved multiple caches with different paths for the same keys?


TODO - decide what do we want to do with the current path input.
Should it be considered deprecated now & removed in v2?

Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
@joshmgross
Copy link
Copy Markdown
Contributor

Hey @sarpik, thanks for the addition!

Unfortunately, I don't think this approach will work, as each cache is immutable, so when you upload multiple paths to the same key you'll only succeed on that first upload.

We're tracking supporting this feature, but I don't have a timeline at the moment.

@kiprasmel
Copy link
Copy Markdown
Contributor Author

@joshmgross cheers!:)

Sad that this won't work:/
Things like yarn (v1) workspaces, where you have options for nohoist & thus multiple paths for the node_modules directory, caching is very annoying atm. since you cannot have multiple paths.

I hope this can be resolved - best of luck!

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.

Cache multiple paths

2 participants