Skip to content

ReadWriteRedis

Source: src/Fly/ReadWriteRedis.ts

Bind a Redis database with read + write access.

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

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