这是indexloc提供的服务,不要输入任何密码
Skip to content

Wrap cache in abstraction layer for a run and for a package task #1256

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

Merged
merged 4 commits into from
May 20, 2022

Conversation

gsoltis
Copy link
Contributor

@gsoltis gsoltis commented May 18, 2022

  • Move Cache options into their own struct
  • Move per-run cache handling into RunCache instance, along with associated Opts
  • Move per-packagetask cache handling into TaskCache instance, created from a RunCache
  • TaskCache is responsible for log recording and replaying, as well as restoring/saving task outputs as appropriate

The TaskCache save and restore methods are intended to be the place to hook in an eventual rpc to no-op the operation if the relevant files haven't changed.

@vercel
Copy link

vercel bot commented May 18, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
turbo-site ✅ Ready (Inspect) Visit Preview May 20, 2022 at 6:59PM (UTC)

@gsoltis gsoltis force-pushed the gsoltis/cache_config branch from 5d019ee to 0fb709a Compare May 18, 2022 17:51
@gsoltis gsoltis changed the base branch from gsoltis/extract_packages to main May 18, 2022 17:51
@gsoltis gsoltis force-pushed the gsoltis/cache_config branch from 0fb709a to a8ec02a Compare May 18, 2022 17:55
@gsoltis gsoltis marked this pull request as ready for review May 18, 2022 17:56
Copy link
Contributor

@jaredpalmer jaredpalmer left a comment

Choose a reason for hiding this comment

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

RunCache is an odd variable name, but I think it's fine. I can't come up with something better off of the top of my head.

@kodiakhq kodiakhq bot merged commit 0f2f7d5 into main May 20, 2022
@gsoltis gsoltis deleted the gsoltis/cache_config branch May 24, 2022 18:43
kodiakhq bot pushed a commit that referenced this pull request Jun 8, 2022
Fixes a bug introduced in [1.2.10](https://github.com/vercel/turborepo/releases/tag/v1.2.10) in which the first line (cache hit) is missing the correct color. 


Caused by #1256
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