# Cypress binaries

Avrea caches Cypress's platform-specific download archives, including its
bundled Electron browser. Repeated downloads of the same version, platform,
and architecture use the packages cache.

## On Avrea runners

When **Package Manager Cache** and **Cypress Binary Cache** are enabled,
Avrea sets this mirror on Linux, macOS, and Windows:

```bash
CYPRESS_DOWNLOAD_MIRROR="https://cache.avrea.com:8443/cypress/"
```

Use your normal Cypress installation:

```yaml
- run: npm ci
- run: npx cypress run
```

If your package manager skips installation scripts, run `npx cypress install`
before running tests.

## What is cached

Avrea caches the Cypress binary archive. Cypress extracts and verifies it on
installation. Its npm dependencies use the [npm cache](/cache/packages/npm/).

View cache activity under **Cypress · Binaries** in the console.

## Enable or disable

**Cypress Binary Cache** (`cache.cypress-binaries.enabled`) is enabled by default.
Turn it on or off at organization or repository level under **Settings** in
the [Avrea console](https://console.avrea.com). **Package Manager Cache**
(`cache.packages.enabled`) must also be enabled.

Disable it for a repository:

```bash
avr settings set cache.cypress-binaries.enabled false
```

Re-enable it:

```bash
avr settings set cache.cypress-binaries.enabled true
```

Reset to the inherited default:

```bash
avr settings reset cache.cypress-binaries.enabled
```

Repository overrides take precedence over organization settings. Changes apply
to new jobs. See [Managing caches](/cache/managing/#cache-settings).

## Overrides

Workflow and step environment variables can override `CYPRESS_DOWNLOAD_MIRROR`.
To clear Avrea's mirror for a step:

```yaml
- run: npx cypress install
  env:
    CYPRESS_DOWNLOAD_MIRROR: ""
```

See Cypress's [installation options](https://docs.cypress.io/app/references/advanced-installation).