Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for caching multiple directories #63

Open
smsunarto opened this issue Apr 9, 2024 · 2 comments
Open

Support for caching multiple directories #63

smsunarto opened this issue Apr 9, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@smsunarto
Copy link

Currently, the plugin only takes in a single directory/path for caching. It would be great to have support for caching multiple directories so you don't have to create multiple entries of cache.

@toote toote added the enhancement New feature or request label Apr 22, 2024
@toote
Copy link
Contributor

toote commented Aug 3, 2024

@smsunarto this is an interesting idea but I can't think of a good reason to do this that wouldn't overcomplicate the code of the plugin without a lot of clarifications in the documentation. In particular, when specifying multiple paths my brain automatically assumes that they are to be treated as a unit so they should all be part of the the same cache entry. Unfortunately, that would mean that the cache entry would only work if the same paths are specified and in the same order (and/or further code will be necessary to make the entry calculation stable) which would be counter-intuitive.

On the other hand, if we are talking about each path having its own cache entry, the code changes to the plugin itself is not too complicated. But then you would be assuming that they share the same configuration for every other setting, or we would need to complicate the settings for the plugin A LOT to handle all possible cases for very little gain when using multiple plugin entries in the step makes a lot more sense and is already flexible enough.

Or is there anything I am missing here?

@smsunarto
Copy link
Author

On the other hand, if we are talking about each path having its own cache entry, the code changes to the plugin itself is not too complicated. But then you would be assuming that they share the same configuration for every other setting,

I think this is perfectly fine for starters; I'd imagine this covers the bases for a lot of people who would need to cache multiple directories.

For example: one of our use case is for Go linting and we want to cache both the Go linter artifacts (to make subsequent runs faster) and the golangci-lint binary, which is in separate paths.

I'd imagine people who needs to have different cache configurations would be fine with creating a separate cache entry.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants