Skip to content

Caching

How do I cache Composer dependencies?

Quick answer

Cache ~/.composer/cache keyed on composer.lock.

The detail that matters

Install with --prefer-dist so packages come from cached archives rather than git clones.

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.