Skip to content

RedisKvStorageOptions

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

Options for createRedisKvStorage: the driver options plus the codec and connection.

Property Type Description Inherited from Defined in
client? RedisClientType A pre-constructed (optionally pre-connected) node-redis client. Never closed by the driver. RedisStorageOptions.client src/storage/redis.ts:74
codec RedisValueCodec The value codec (stringCodec or jsonCodec). - src/storage/redis.ts:287
connection? RedisConnection A connection to reuse (so a product capability layer shares the driver’s client). Default: one built from url/client/onError. - src/storage/redis.ts:292
onError? (error) => void Called on client error events (connection drops, reconnects). A handler is always attached so a downed Redis never crashes the process with an unhandled error event. RedisStorageOptions.onError src/storage/redis.ts:81
onWrite? RedisWriteHook Called after every write, swap and remove; see RedisWriteHook. RedisStorageOptions.onWrite src/storage/redis.ts:83
prefix? string Optional key namespace prepended to every key, joined with :. RedisStorageOptions.prefix src/storage/redis.ts:76
subpath? string The import path to name in error messages (a missing peer, a missing client/url…), e.g. "@xtandard/webhooks/storage/redis" when a product re-exports this driver. Default: the kit subpath. RedisStorageOptions.subpath src/storage/redis.ts:70
url? string Connection URL (e.g. redis://localhost:6379). Used when no client is given. RedisStorageOptions.url src/storage/redis.ts:72