Back to Electric

Redis - Integrations

website/docs/integrations/redis.md

latest905 B
Original Source

Redis

Redis is an in-memory "data structure server", often used as a cache.

Electric and Redis

Many applications use Redis as a local cache. With Electric, you can define a Shape and sync it into a Redis data structure.

Example

The shape stream comes through as a log of insert, update and delete messages. Apply these to the Redis hash and the cache automatically stays up-to-date:

<<< @../../examples/redis/src/index.ts

See the Redis example for more details.

<HelpWanted issue="1881"> a library that wraps up the <code>redis-sync</code> example into an <code>@electric-sql/redis</code> integration library. </HelpWanted>