Build a real-time cache with Postgres change data capture (CDC) and Redis Strings. Learn to keep your Redis cache in sync with your database.
Navigate to Sinks
Configure the source
insert
, update
, delete
). You likely want to cache all actionsSet up initial backfill
Create a transform
Configure Redis connection
localhost
or redis.example.com
)6379
)0
)Test and create the sink
products-cache
)-
(ie. sequin:products:42-123
).
SET
operationsDEL
operationsexpire_ms
to automatically expire keys after a specific period:
expire_ms: 86400000
=> 24-hour cacheexpire_ms: 3600000
=> 1-hour cachedelete
actions are enabled in the sink configuration.