Valkey caches
Valkey is the open-source drop-in replacement for Redis we ship as managed cache. Every redis-cli command works; every Redis client library works without changes.
Provision a cache
From Caches in the dashboard, click New cache. Pick a name and a plan.
Plans are sized by memory (the dominant constraint for cache workloads). CPU comes along proportionally; disk is sized for AOF persistence (about 2× memory by default).
Connecting from your app
Same pattern as databases: from the cache's detail page, under Bound apps, pick the app and Bind. You choose the env var name (defaults to REDIS_URL) and the format - a StackExchange.Redis configuration string, or a redis:// URL. velixir injects that one variable on the app's next deploy; bind a second cache under a different name if you need more than one. From the CLI: velixir cache bind <cache-id> --app <app-id>, adding --format adonet for the StackExchange.Redis form.
// .NET, with the cache bound in the StackExchange.Redis format
// (ConnectionMultiplexer expects its own format, not a redis:// URL)
var redis = ConnectionMultiplexer.Connect(
Environment.GetEnvironmentVariable("REDIS_URL"));
Most other clients (ioredis, node-redis, redis-py, go-redis) take the redis:// URL directly.
Persistence
Persistence is a per-cache toggle. The Starter tier is intentionally ephemeral (pure in-memory, lost on restart) so it stays cheap and fast. Standard and above turn persistence on by default: AOF (append-only file) with fsync everysec plus a periodic RDB snapshot - strong enough to survive a pod restart without losing more than about a second of writes. Toggle it on the cache's Edit page; flipping it recreates the cache and clears in-memory data, so do it during a quiet window.
When the cache is full
Each cache has a memory limit from its plan. What happens when it's reached is up to you:
- Evict least recently used keys (the default,
allkeys-lru). The oldest keys make room for new ones. Right for a cache, where anything can be rebuilt from your database. - Never evict keys (
noeviction). Writes fail with an out-of-memory error instead, and nothing is dropped. Use it for job queues (BullMQ, Sidekiq, Celery with a Redis broker), sessions, rate-limit counters, or anything else you can't rebuild. BullMQ prints a warning at start-up until you do.
Pick it when you create the cache, or change it later on the cache's Edit page. It takes effect straight away, with no restart and no lost keys. From the CLI: velixir cache create --no-eviction, or velixir cache eviction <id> noeviction. On the API: PUT /api/v1/caches/{id}/eviction-policy with { "policy": "noeviction" }.
Snapshots & restore
Persistent caches snapshot to object storage every 6 hours, and you can take one on demand with Snapshot now on the cache's detail page. The Snapshots list shows what's stored; Restore reloads the cache in place from the snapshot you pick. Restore is one-click but destructive - it replaces the current keyspace - so it's gated behind typing the cache name plus an explicit acknowledgement, and the cache is briefly offline while it reloads. (Ephemeral Starter caches take no snapshots and have nothing to restore.)
Snapshots are kept for your plan's retention window - Standard 7 days, Pro 14, Scale 28. Within that window we thin them automatically: every 6-hourly snapshot is kept for the first 24 hours (so you can roll back to any point in the last day), then one snapshot per day for the rest of the window. Anything past the window is pruned.
Restoring a deleted cache
Deleting a persistent cache takes one last snapshot and keeps its snapshots for your plan's retention window, so a cache deleted by mistake can still be brought back with the keys it had. It's listed under Recently deleted on the Caches page: press Restore and velixir creates a new cache, with the same eviction setting, and loads that last snapshot into it. Bind the new cache to your apps and redeploy them to switch over. From the API: GET /api/v1/caches/deleted and POST /api/v1/caches/{id}/restore. Kept snapshots cost nothing. Deleting your account or team deletes them at once, and ephemeral Starter caches have nothing to keep.
Note: caches are single-node (single-AZ) by design - the cache-miss-is-cheap pattern treats a restart as a rebuild from your database, the source of truth. There's no cache replication or HA tier.
Connecting from outside
Same as databases: open the cache's detail page and Reveal the external connection string (external access must be enabled). External traffic routes through the edge over TLS (rediss://), so redis-cli --tls - or any Redis client - works from anywhere. The AUTH password is the same one your apps use; only the host and port differ.