memoryIdempotencyStore

cart · /core·function

In-memory backed by a Map. Suitable for tests, single-process dev servers, and as a reference implementation. Entries lazily expire on read; there is no background sweep.

Signature

@nordcom/commerce-cart

Returns

An ephemeral store with no cross-process coordination.

Example

const kernel = createCart({
  adapter,
  middleware: [idempotency({ store: memoryIdempotencyStore(), windowMs: 30_000 })],
});

RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartUserError CartAdapter

On this page