Skip to content

RedisWriteHook

type RedisWriteHook = (key, value, ctx) => void | Promise<void>;

Defined in: src/storage/redis.ts:57

A write hook (ADR 0004): called after every successful setItem, successful compareAndSwap (with the new value) and removeItem (with null, whether or not the key existed). An error thrown by the hook rejects the call; the write itself has already happened.

Parameter Type
key string
value unknown
ctx RedisWriteContext

void | Promise<void>