Skip to content

ReadWriteRedis

Source: src/Railway/ReadWriteRedis.ts

Bind a Redis database with read + write access.

ReadWriteRedis is the Context tag, the type, and the callable — yield* Railway.ReadWriteRedis(Cache). Provide ReadWriteRedisHttp.

const cache = yield* Railway.ReadWriteRedis(Cache);
yield* cache.set("marker", "hello");
const value = yield* cache.get("marker");