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

Consider how to create stable and unique cache keys #5

Open
hinshun opened this issue Feb 27, 2020 · 0 comments
Open

Consider how to create stable and unique cache keys #5

hinshun opened this issue Feb 27, 2020 · 0 comments

Comments

@hinshun
Copy link
Contributor

hinshun commented Feb 27, 2020

A common pattern among all build workflows is using cache mounts. But in order to use it, we need to provide a cache key. If we're using the same HLB for multiple projects, or multiple users using the same BuildKit we need their cache keys to not collide.

For example, we can do:

run "foobar" with option {
    mount fs { scratch; } "/cache" with option {
        cache string { hash string { getEnv "CWD"; }; }
    }
}
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

1 participant