IdempotencyStore

cart · /core·interface

Backing store contract for the middleware. Implementations persist successful mutation results keyed by idempotency token so that duplicate requests within the TTL window replay the cached cart without re-invoking the adapter.

Properties

get
unknown
set
unknown

Example

const store: IdempotencyStore = memoryIdempotencyStore();
await store.set('idem-key', cart, 30_000);
const hit = await store.get('idem-key');

RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartUserError CartAdapter

On this page