# Cache the dependency install that reinstalls from scratch

A full install on every run, replaced with a cache, and timings recorded both with and without it.

Category: Pipeline speed and cost
Source: https://letsship.ai/use-cases/cache-the-dependency-install
Published: 2026-08-25

## Goal

Add dependency caching to the pipeline so installs stop running from scratch.

## Acceptance criteria

- The cache key is derived from the lockfile
- Cold and warm timings are both recorded
- A lockfile change correctly invalidates the cache
- The cache cannot serve stale dependencies

## What lands as proof

Both cold and warm timings, plus a demonstration that changing the lockfile busts the cache.

## Prompt

Copy this to an agent to open the ticket:

```text
Create a Linear issue in my team and assign it to the SHIP agent.

Title: Cache the dependency install in CI

Description: Add dependency caching to the pipeline so installs stop running from scratch.

Acceptance criteria:
- The cache key is derived from the lockfile
- Cold and warm timings are both recorded
- A lockfile change correctly invalidates the cache
- The cache cannot serve stale dependencies

Before you create the issue, time this repository's install step and check whether any cache is configured. Pipeline edits will stop for a human to approve.
```

## Questions

### What does the agent actually change?

The ticket is scoped to one outcome: add dependency caching to the pipeline so installs stop running from scratch. Work that serves that outcome is in scope, and anything outside it is left for a separate ticket, so the pull request stays reviewable.

### How do I know the work is done?

The pull request carries the evidence, not only the diff. Here that means cold and warm timings recorded in the description, so a reviewer can confirm the result without reproducing the work locally.

### How much oversight does this need?

The run stops for the plan, and the review bar is raised afterwards so that smaller suggestions block the merge too, not only serious findings.
