Caching Dependencies
Seed automatically caches dependencies to speed up your builds. Currently dependency cache is available for Node.js projects. If you would like support for other runtimes, feel free to contact us. This speeds up your builds if you are using Node.js. But it also speeds up deployments for other runtimes that are using Serverless Framework plugins.
Node.js
Here is how it works for Node.js projects.
- Seed auto-detects the package manager based on the
yarn.lock
orpackage-lock.json
file.- If Yarn is detected, Seed will cache the
node_modules
directory in the project root along with the Yarn cache. - If instead, npm is detected, Seed will cache
node_modules
directory in the project root.
- If Yarn is detected, Seed will cache the
- In the Init step of the build process, Seed will restore the dependency cache. And in the Cleanup step of the build process, Seed will update the dependency cache.
- Dependencies are cached on a per-stage basis. So when deploying a stage, the cache for that stage is loaded up.
- If a stage hasn’t been deployed to for 7 days, the cache is automatically cleared.
- Finally you can manually clear the cache by using the Force deploy option while triggering a deployment.
A quick note on the impact of caching dependencies on build minutes. The time it takes to restore the cache counts towards the build minutes of your account. While the time to update the build cache does not.
Help improve this page. Edit it with GitHub
Was this page helpful? Let us know via Twitter
Do your Serverless deployments take too long? Incremental deploys in Seed can speed it up 100x!
Learn More