Skip to content

Second iteration of new caching API - #3341

Merged
vito merged 3 commits into
dagger:cloakfrom
vito:caches-v2
Oct 14, 2022
Merged

vito merged 3 commits into
dagger:cloakfrom
vito:caches-v2

Conversation

@vito

@vito vito commented Oct 12, 2022 •

Copy link
Copy Markdown
Contributor

follow-up to #3287 which has a lot of discussion that led to the following changes:

  • cacheFromTokens -> cache { withKey }; we can use this to "chain" keys from an initial scope, currently global
  • cacheFromTokens -> cacheVolume(key: String!) - no scoping at the moment, but easy to add later
  • switch from a list of tokens to a single key; a list doesn't help much at API level since it's already a separate query so you can't just reuse a param from something else
  • there's still a list of keys (formerly tokens) internally, but now it's an implementation detail

@netlify

netlify Bot commented Oct 12, 2022 •

Copy link
Copy Markdown

👷 Deploy request for cloak-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 6c2b545d3218d9816fd5e6fee9ce21d76b75ccc5

@vito
vito requested review from aluzzardi, shykes and sipsma October 12, 2022 21:26
vito added 2 commits October 13, 2022 18:27
* tokens -> key; list doesn't help much since it's already a separate
  query
* cache { withKey } instead of cacheFromTokens/cacheFromKey; we can use
  this to "chain" keys from an initial scope, currently global

Signed-off-by: Alex Suraci <[email protected]>
I think this part was OK, since the alternative is just concatenating
them anyway; we just don't need to expose it directly to users.

Signed-off-by: Alex Suraci <[email protected]>
kept the same list-of-keys structure internally so we can just yeet
scoping values in there someday

Signed-off-by: Alex Suraci <[email protected]>

@sipsma sipsma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@vito
vito merged commit cf8c214 into dagger:cloak Oct 14, 2022
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.

2 participants