> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webapp.io/llms.txt
> Use this file to discover all available pages before exploring further.

# CACHE

`CACHE [cached directories...]`

The `CACHE` instruction makes specific files/directories be shared across runs,
almost always as a performance improvement.

See the [tuning performance documentation](/tuning-performance) for more
details.

### Examples

* Use `CACHE /var/cache/apt` to speed up `RUN apt-get update`
* Use `CACHE ~/.cache/go-build` to speed up `RUN go install`
* Use `CACHE ~/.npm ~/.next/cache ~/.yarn/cache` to speed up `npm install` and
  `yarn install`

Each webapp.io account gets a fixed amount of cache storage, and we periodically
delete old or inactive caches.
