Using Jenkins' [Job Cacher](https://www.jenkins.io/doc/pipeline/steps/jobcacher/) plugin, add the following build step to your `Jenkinsfile` where you would normally run `next build` or `npm install`:
```yaml
stage("Restore npm packages") {
steps {
// Writes lock-file to cache based on the GIT_COMMIT hash