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

Allow local cache to be made read-only #1852

Closed
uellenberg opened this issue Aug 3, 2023 · 0 comments · Fixed by #2048
Closed

Allow local cache to be made read-only #1852

uellenberg opened this issue Aug 3, 2023 · 0 comments · Fixed by #2048

Comments

@uellenberg
Copy link
Contributor

uellenberg commented Aug 3, 2023

Perhaps this is related to #30, but simpler. I'm looking for a way to make the local cache read-only, so that subsequent builds still get files from the cache, but won't add new items to it. I think GCS has an option for this under SCCACHE_GCS_RW_MODE, but I'm looking to use it for a local cache.

My use case is that I'm building a Docker container with a lot of dependencies pre-compiled. That docker container is than ran and used to compile programs. Ideally, those programs use dependencies that have already been pre-compiled, speeding up compile times. Adding items to the cache when the container is being built is useful, but not when the container is run, as it just ends up using unnecessary disk space.

It'd be wonderful if there was an environment variable (e.g., SCCACHE_LOCAL_RW_MODE) that when set to some value (e.g., READONLY or 0) makes items still be retrieved from the cache during builds, but prevents new items from being added to it.

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 a pull request may close this issue.

1 participant