Docs

# Dependency caching

Each job gets back the package stores and build caches the last job on your default branch left. There is no step to add.

## What’s kept

These folders are restored at the start of a job and saved after it:

| Folder | Path |
| --- | --- |
| pnpm-store | `~/.local/share/pnpm/store` |
| npm | `~/.npm` |
| yarn | `~/.cache/yarn` |
| go-build | `~/.cache/go-build` |
| go-mod | `~/go/pkg/mod` |
| pip | `~/.cache/pip` |
| cargo-registry | `~/.cargo/registry` |
| playwright | `~/.cache/ms-playwright` |

They count toward the repository’s 10 GB. A job saves only the folders it changed. Tool versions in `/opt/hostedtoolcache` aren’t kept, since the [image](https://checklane.sh/docs/runners/image) has them. Task outputs from turbo and nx aren’t kept either.

See [how to cache pnpm in GitHub Actions](https://checklane.sh/guides/github-actions-pnpm-cache).

## When a job saves

Every job restores them. A job saves only when all of these are true:

-   The job succeeded.
-   The run came from a `push`, `schedule` or `workflow_dispatch`.
-   It ran on the repository’s default branch.
-   The code is from the repository itself, not a fork.

Pull requests start from what the default branch saved, but never fill it. See [Cache security](https://checklane.sh/docs/security/cache-trust).

## Switch one off

On the Caching page, each folder shows as an entry marked Automatic, with its path and size. An admin opens it and chooses Stop saving this folder. That repository’s jobs then neither restore nor save it, and its saved copy is deleted.

---

From https://checklane.sh/docs/caching/package-folders
