> Index of every page on this site: [llms.txt](https://docs.a-line.cloud/llms.txt)

# Pull-through cache

> Cache images from Docker Hub, GHCR, Quay or another registry in your own A-Line.cloud registry, so pulls stay fast, avoid upstream rate limits and keep working when the upstream is down.

**Goal**: pull public or private upstream images through your own registry,
for example `docker.io/library/nginx` as
`registry.a-line.cloud/<org>/pull_cache/hub/nginx`.

## Add a cache

<Steps>
<Step>

Open **Registry**, then **Pull-through cache**, and click **Add pull-through
cache** (org owners and admins).

</Step>
<Step>

Pick a suggested upstream or enter your own:

- **Alias**: the path segment after `pull_cache/`, such as `hub`, `ghcr` or
  `quay`. Lowercase letters and digits in words joined by single hyphens, at
  most 32 characters. It can't change later.
- **Upstream registry**: a host such as `docker.io` or `ghcr.io`, or a full
  `https://host[:port]` address. Only public addresses are allowed.
- **Credential**: none for anonymous pulls, or one of your
  [external registry credentials](#credentials) for the same host.
- **Refresh interval**: how many minutes a tag is trusted before the upstream
  is asked again (15 to 10080, default 360).

</Step>
<Step>

Click **Test** on the cache to check that the upstream answers with its
login.

</Step>
</Steps>

## Pull through it

Sign in to your registry as usual, then pull with the cache's prefix:

```sh
docker pull registry.a-line.cloud/<org>/pull_cache/hub/nginx:1.27
docker pull registry.a-line.cloud/<org>/pull_cache/ghcr/<owner>/<image>:<tag>
```

On Docker Hub, a one-part name such as `nginx` means the official
`library/nginx` image. Apps can use the same reference as their image.

The first pull of a tag fetches it from the upstream and stores it; later
pulls are served from your registry. Digests are kept as the upstream has
them, so `@sha256:...` references work. After the refresh interval the
upstream is asked whether the tag moved. If the upstream is down or refuses,
the copy you already have is served.

Cached repositories show a **Pull-through cache** badge on the Images tab.
Nobody can push into `pull_cache/`.

## Credentials

Private upstream images need a login: add it under **External registries**
first, then pick it on the cache. The credential's host must match the
upstream's. A credential used by a cache can't be deleted until the cache
stops using it.

Without a credential, Docker Hub pulls go through a platform account shared
by every organization, with its own rate limit. Add your own Docker Hub login
when you pull a lot.

## Limits and storage

- Cached images count toward your registry storage and its
  [quota](/guides/registry-repositories). When the quota blocks pushes,
  an image is only cached when it fits in what is left of the quota; images
  already cached still pull.
- Fetching images from the upstream is limited per organization: a burst of 120
  manifest fetches (one or two per image), then one every 15 seconds. Above
  that, the pull is refused with a retry time. Pulls of images already cached aren't limited.
- Cached images not pulled for 30 days are removed. The next pull fetches
  them again.
- Pausing a cache (switching off **Fill the cache on pull**) or deleting it
  stops new fetches; cached images stay until they expire.

## API and MCP

The same caches are under `/v1/registry/pull-caches` in the
[API](/api/reference), and the MCP tool `list_pull_caches` lists them.
