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

# Cache Servers

> Choose which cache server this computer downloads files from

<Note>
  Cache servers are an Enterprise feature. If your deployment has none, see the [pricing page](https://www.diversion.dev/pricing).
</Note>

A cache server keeps a copy of your repository files close to your team, for example inside an office network. Large downloads come from the cache instead of the main storage, so they finish faster.

## How a cache server is chosen

The Diversion agent on each computer gets the list of cache servers from your deployment.

* With one cache server, the agent uses it.
* With several, the agent measures the response time of each one and uses the fastest.
* If a cache server stops answering, downloads fall back to the main storage until the cache is healthy again.

This is the **Automatic** mode, and it is the default.

## Pin a cache server

You can pin one cache server instead of letting the agent choose. This helps when you are on a VPN, when you test a new cache server, or when the measured response time does not match real download speed.

The pin is an agent setting, so it applies to the current computer only. It survives agent restarts, and the desktop app and the command line show and change the same setting.

### In the desktop app

<Steps>
  <Step title="Open your profile">
    Click your avatar in the top right corner and choose **Your profile**.
  </Step>

  <Step title="Find the This computer section">
    The **This computer** section is shown only in the desktop app, because it controls the agent running on this computer. It is not shown in the browser.
  </Step>

  <Step title="Choose a cache server">
    In **Cache server**, choose one of:

    * **Automatic**: the agent picks the fastest cache server. The menu shows which one is in use now.
    * A cache server from the list your deployment advertises.
    * **Custom URL**: type the `http(s)` address of a cache server and click **Apply**.

    The setting is saved on the agent right away.
  </Step>
</Steps>

If the section says the Diversion agent is not reachable, start the agent (open the desktop app or run any `dv` command) and reload the page.

### From the command line

```bash theme={null}
dv blob-cache                      # show the pinned, active, and available cache servers
dv blob-cache set <name-or-url>    # pin a cache server by name or http(s) URL
dv blob-cache clear                # go back to Automatic
```

A pin by name must match a cache server your deployment advertises. A pin by URL can point at any `http(s)` cache server.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.