---
title: "Caches"
description: "Managed Valkey and Memcached in your VPC, with TLS, users whose passwords live in Secrets, an optional standby and metrics in Obs."
---

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

# Caches

EZGH Caches runs Valkey and Memcached for you, in a subnet of your VPC: an object cache for
WordPress, a rate limiter or a session store for your apps. You connect to an **endpoint**, a DNS
name that stays the same for the cache's life. With a **standby**, a cache fails over by itself, the
endpoint follows, and clients reconnect to the same name.

- [Create a cache](/caches/create) — Engines, modes, sizes, storage, who can connect and maintenance.
- [Connect WordPress](/caches/connect-wordpress) — Redis Object Cache with Valkey, and W3 Total Cache with Memcached.
- [Connect your apps](/caches/connect-apps) — TLS, clients, timeouts, DNS and rate limiting.
- [Users](/caches/users) — Users with a preset, and their passwords in Secrets.
- [Standby and failover](/caches/standby-and-failover) — What a standby does on each engine, and what a failover changes.
- [Upgrades](/caches/upgrades) — New Valkey versions in place or through a blue/green deployment.
- [Monitoring](/caches/monitoring) — Engine metrics, the built-in dashboard and events.

The Caches API is at `https://caches-api.ezghcloud.com`. In the console, open **Caches**.

## Engines

| | Valkey | Memcached |
| --- | --- | --- |
| Versions | 8.1, 9.1 | 1.6 |
| Modes | `memory` or `persistent` | `memory` |
| Port | 6379, TLS | 11211, TLS; 11212 without TLS (optional) |
| Authentication | Username and password | Username and password (SASL, binary protocol) |
| Standby | Holds a live copy of the data | Starts empty |
| Upgrades | In place or blue/green | Replaced in the maintenance window, empty |

- **`memory`**: the data lives in memory only.
- **`persistent`** (Valkey): the data is also written to storage, and survives restarts, maintenance
  and failovers.

## Status

| Status | Means |
| --- | --- |
| `creating` | It's being created. |
| `available` | It's serving. |
| `modifying` | A change is being applied. It serves meanwhile. |
| `failing_over` | It's failing over. Open connections end, and clients reconnect to the same endpoint. |
| `recovering` | It failed over and is finishing recovery. It serves meanwhile. |
| `upgrading` | It's moving to a new engine version. It serves meanwhile. |
| `storage_full` | (Persistent) Its storage is full and Valkey refuses writes. [Grow the storage](/caches/create#storage). |
| `deleting` | It's being deleted. |
| `deleted` | It's gone. |
| `failed` | It couldn't be created. |

New statuses may appear.

## Flush a cache

```sh
ezgh caches flush cch_4k2m9x0a7qpe --wait
```

A flush empties the cache, for when no client can connect to do it. In the console, it's **Flush cache**
on the cache's page.

## Delete a cache

```sh
ezgh caches delete cch_4k2m9x0a7qpe --wait
```

Deleting a cache deletes its data and its users' [Secrets](/caches/users#passwords-in-secrets), as
you, so it also needs `secrets.secrets.delete` in the project. It's refused with
`409 deletion_protected` while deletion protection is on (`deletionProtection`;
`--deletion-protection` and `--deletion-protection=false` on create and update), and with
`409 cache_in_use` while a [firewall rule](/caches/create#who-can-connect) names the cache: delete the
rule first.

## Pricing

Each node of a cache is billed by the hour at the hourly price of an instance of its instance type:
one node, or two with a [standby](/caches/standby-and-failover). Storage isn't billed yet. See
[Pricing](/billing/pricing) for current prices.

## Limits

| Limit | Value |
| --- | --- |
| Caches per project | 5 by default, up to 40 |
| Users per cache | 20 |

## IAM

| Policy | Allows |
| --- | --- |
| `CachesFullAccess` | Everything here. |
| `CachesReadOnlyAccess` | Listing and viewing caches, users and blue/green deployments. `ReadOnlyAccess` includes the same. |

Creating a cache, creating a user and rotating a password write a Secret as you, so they also need
`secrets.secrets.create` and `secrets.versions.create` in the project. Deleting a cache or a user
deletes Secrets as you, which needs `secrets.secrets.delete`.

Source: https://docs.ezghcloud.com/caches/index.mdx
