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

Add option on remote caches to be read-only? #50

Closed
bartdesmet opened this issue Apr 18, 2024 · 1 comment
Closed

Add option on remote caches to be read-only? #50

bartdesmet opened this issue Apr 18, 2024 · 1 comment

Comments

@bartdesmet
Copy link
Contributor

It'd be useful to have a "read-only" flag for remote caches, similar to ccache's support for a read-only=true flag that can be specified on a per-remote basis. See https://ccache.dev/manual/4.9.1.html#_attributes_for_all_backends.

Our scenario is a bunch of CI machines that run builds, including clang-tidy checks. These all use a common cache using clang-tidy-cache-server, which greatly speeds up the CI pipelines (over 98% gains). Developers would also like to benefit from this cache for local builds, but we wouldn't want to pollute the cache as they're making local iterations to their code, often in a tight development loop with repeated builds using clang-tidy.

If there's no objection, I'm happy to prepare a change, potentially with CTCACHE_[S3|GCS|HOST]_READ_ONLY flags that default to 0 but can be set to 1. The effect would be for store_in_cache functions to simply return.

@matus-chochlik
Copy link
Owner

I don't see why not off the top of my head, I'd be happy to merge a PR with the described changes.

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

No branches or pull requests

2 participants