vapor-chamber API reference - v1.16.0
    Preparing search index...

    Type Alias IdempotentOptions

    type IdempotentOptions = {
        key?: (cmd: Command) => string | null | undefined;
        ttl?: number;
        actions?: string[];
        stampMeta?: boolean;
        maxKeys?: number;
    }
    Index
    key?: (cmd: Command) => string | null | undefined

    Derive a stable idempotency key from a command. Commands with the same key are the same logical operation. Return null/undefined to skip a command. Default: commandKey(action, target) (action + stable JSON of target).

    ttl?: number

    How long (ms) a completed key is remembered for dedup — the window in which a repeat (double-click, retry, reconnect replay) is collapsed to the first result instead of hitting the handler/backend again. Default: 60_000.

    actions?: string[]

    Restrict to specific actions (glob patterns). Default: all.

    stampMeta?: boolean

    Also stamp the key onto cmd.meta.idempotencyKey so transports forward it (the HTTP bridge sends it as an Idempotency-Key header). Default: true.

    maxKeys?: number

    Max completed keys remembered at once — oldest is evicted first, so memory stays bounded on long-lived buses with many distinct targets. Default: 500.