Skip to main content

Cache (Valkey)

1. Overview

The Cache (Valkey) add-on deploys an instance of Valkey — an open-source fork of Redis — inside an environment, for use as cache, session management, pub/sub, and real-time data structures.

Use it when a flow, app, or another add-on needs fast in-memory key/value storage, with or without disk persistence.

Catalog tags: Cache, In-Memory, Key-Value.

2. Prerequisites

  • A squad and an environment already selected on the Add-ons screen.

3. Deploy Step-by-Step

The Cache (Valkey) deploy wizard has 4 steps:

Step 1 — General

FieldRequiredDescription
Add-on NameYesName of the add-on within the environment. Lowercase letters, numbers, and hyphens only (3 to 63 characters). Example: my-cache.

Step 2 — Admin User

The default Valkey user uses password authentication via REQUIREPASS. The username is fixed (default) — additional ACL users can be created later.

FieldRequiredDescription
Admin UsernameFixed to default, not editable.
PasswordYesAuthentication password for the default user.
Eviction PolicyNoDefines how keys are evicted when the memory limit is reached. Default: allkeys-lru (recommended policy for cache use).

Step 3 — Persistence

Defines how data survives restarts, and configures automatic backups (same pattern as the PostgreSQL add-on).

FieldRequiredDescription
Persistence ModeNoData persistence mode. Options: NONE (pure in-memory cache, no persistence), RDB — periodic snapshots (default), AOF — append-only log (more durable, but slower), RDB+AOF — both combined.
RDB Save ScheduleIf mode is RDB or RDB+AOFseconds changes pairs that define when a snapshot is triggered. Default: 3600 1 300 100 60 10000 — triggers a snapshot every hour with at least 1 change, every 5 min with 100, or every 1 min with 10000.
Enable automatic backupsNoTurns automatic backups on/off. On by default.
Keep last N backupsIf backups are onNumber of most recent backups kept before purging the oldest ones. Default: 10.
Cron schedule (UTC)If backups are onCron expression (in UTC) that defines the backup frequency. Default: 0 2 * * * (every day at 02:00 UTC).

Step 4 — Resources

Defines the resources allocated to the instance.

FieldDefaultMaximum
Memory256Mi2Gi
CPU500m2000m
Disk Size1Gi20Gi

Clicking Deploy Add-on starts the deployment. The add-on then appears on the environment's My Add-ons tab.

4. After Deployment

TODO: describe how to obtain the instance's connection host/port after deployment, and how to create additional ACL users besides the default user.

5. FAQ

What's the difference between the persistence modes (NONE, RDB, AOF, RDB+AOF)? NONE writes nothing to disk — if the instance restarts, data is lost (pure cache use). RDB takes periodic snapshots of the state (may lose the last changes between snapshots). AOF logs every change (more durable, but with more overhead). RDB+AOF combines both.

Can the Eviction Policy be changed after deployment? TODO: confirm whether Eviction Policy can be changed after deployment.