Create a Redis-backed store adapter for idempotency entries.
Uses SET NX PX for atomic claim-and-lock and SET KEEPTTL for completion (preserves the original TTL, not reset on replay).
SET NX PX
SET KEEPTTL
An ioredis Redis instance. Must be connected before first use.
Redis
import { Redis } from 'ioredis'import { redisStore } from 'latch-store'const store = redisStore(new Redis()) Copy
import { Redis } from 'ioredis'import { redisStore } from 'latch-store'const store = redisStore(new Redis())
Create a Redis-backed store adapter for idempotency entries.
Uses
SET NX PXfor atomic claim-and-lock andSET KEEPTTLfor completion (preserves the original TTL, not reset on replay).