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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key |
string |
value |
unknown |
ctx |
RedisWriteContext |
Returns
Section titled “Returns”void | Promise<void>