# Multiple checkouts vs passing source code via workflows

**URL:** <https://discuss.circleci.com/t/multiple-checkouts-vs-passing-source-code-via-workflows/32554>\
**Category:** Caching Dependencies\
**Tags:** workflows\
**Created:** [September 20, 2019, 2:03pm UTC](https://discuss.circleci.com/t/multiple-checkouts-vs-passing-source-code-via-workflows/32554 "2019-09-20T14:03:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![justinNC](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/justinnc/32/33780_2.png) [@justinNC](https://discuss.circleci.com/u/justinNC)\
**Post date:** [September 20, 2019, 2:03pm UTC](https://discuss.circleci.com/t/multiple-checkouts-vs-passing-source-code-via-workflows/32554/1 "2019-09-20T14:03:24Z")

</div>

I’m just getting started with CircleCI. Something I’m not clear on… just using Golang as an example:

- In my first job, I run “checkout” and then install a whole bunch of 3rd party dependencies into a vendor folder via one of these three tools: Go Mod, Go Dep, or Glide. The additional dependencies seems like a great candidate for caching using the lock file as a hash.
- My question: is it a best practice to perform this exact same sequence of steps for all subsequent jobs as well (and individually caching these steps as well)? I’ve observed that some config files that I’ve found online will instead pass all source code to the next job using persist\_to\_workspace. Is this good or bad practice? Is it correct that persist\_to\_workspace is an expensive operation that should generally only be used for build artifacts?
