Skip to content

createInMemoryIdempotencyStore

createInMemoryIdempotencyStore(params?): IdempotencyStore

Defined in: src/idempotency/store.ts:119

In-memory, single-process idempotency store: a bounded LRU with a leased in-flight state machine and lazy TTL eviction. The default the SDK ships; safe for one process, NOT for multiple replicas (see the construct-time warning).

Parameters

params?

CreateInMemoryIdempotencyStoreParams = {}

Returns

IdempotencyStore

Example

import { createInMemoryIdempotencyStore } from "kawasekit/idempotency";
const store = createInMemoryIdempotencyStore({ maxEntries: 50_000 });
const result = await store.begin(key);
if (result.status === "completed") {
// replay result.record
}