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
function memoryIdempotencyStore(): IdempotencyStore;Returns
An ephemeral store with no cross-process coordination.
Example
const kernel = createCart({
adapter,
middleware: [idempotency({ store: memoryIdempotencyStore(), windowMs: 30_000 })],
});Related
RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartUserError CartAdapter
MetadataOpen in GitHub ↗
logger
Builtin middleware that logs mutation lifecycle events via ctx.logger. Emits cart.mutation.start before delegation, cart.mutation.end on resolve, and cart.mutat
MoneyCents
Integercents money representation used for all arithmetic inside the cart kernel. Avoids floatingpoint rounding by working in the currency's minor units. Conver