1. Home
  2. Destinations
  3. Redis cache
DESTINATION · STORAGE & CACHE

A Redis cache that mirrors Postgres.

Inserts and updates write the row; deletes remove it. Per-row ordering means the last write always wins correctly.

The Redis cache sink turns change data capture into cache invalidation: the key is your prefix plus the row's ordering key (schema.table:pk), the value is the change JSON, and a delete removes the key. No TTL guessing, no stale reads after a write, no trigger code in the database.

How delivery works

AspectBehaviour for Redis cache
CommandSET prefix+ordering_key <change JSON> for inserts and updates; DEL for deletes. No TTL.
BatchingOne pipeline per batch.
OrderingChanges to one key are applied in commit order, so the cache converges on the row's latest state.
IdempotencyWrites are idempotent by nature: a redelivered SET writes the same value.
On failureA failed request is retried up to 5 times with exponential backoff (30 s, 1, 2, 4 min, with jitter). After the fifth failure the message is parked as undelivered, the console shows it with the last error, and one click replays it — later changes to the same row wait behind it so order is preserved.
Connection checkPING.

Set up in three steps

  1. Connect your database

    Paste a connection string and press Test. Waltail checks the version (12+), that wal_level is logical, that the user may replicate, and that a slot is free — and shows the fix for anything that fails. Then it creates its own publication and replication slot. Connection guide →

  2. Add Redis cache as a destination

    Pick the tables to stream, choose Redis cache, and fill in Address. Press Test — Waltail checks it can reach and write to Redis cache before anything is saved.

  3. Change a row

    Insert or update a row. The console shows the first event as it is captured and delivered; from then on, every committed change follows within about a second. Have rows that already exist? Run a backfill — confirm the estimate and they arrive through Redis cache as read events.

Configuration

Fields as the console asks for them. Secrets are encrypted at rest and never shown again.

FieldConsole labelRequiredNotes
addrAddressYeshost:port.
passwordPasswordOptional
key_prefixKey prefixOptionale.g. cache:; the ordering key is appended.

Every sink also has two tuning settings: batch size (messages per request, default 100) and rate limit (messages per second, default unlimited). Changes to one row are never in flight twice at once.

Example

What Redis cache receives:

SET cache:public.orders:42 '{"op":"update","table":"public.orders","data":{"id":42,"status":"shipped",...}}'
DEL cache:public.orders:43

Message format reference →

Questions

Is the value the row or the whole change?

The whole change JSON — the current row is under data, the previous values under old when replica identity provides them.

Can I invalidate instead of write?

Point your application at the key: read through on a miss, and treat the presence of a freshly written value as the new truth. If you only want invalidation, a webhook or queue sink plus a tiny consumer that DELs is the usual shape.

Related

Redis Streams

XADD, consumer groups

Elasticsearch

Bulk upsert and delete

Webhooks

Any HTTPS endpoint

Use cases: Webhooks for your database · Cache invalidation · Search index sync · Event-driven services · Audit log and archive.

Start streaming to Redis cache.