Interface ActionDeduplicatorConfig

File

ActionDeduplicator.ts

Description

Hash-based tracking of recent actions within a configurable time window. Prevents identical actions from being executed twice in rapid succession. Caller computes the key string — this class is intentionally generic.

interface ActionDeduplicatorConfig {
    windowMs: number;
    maxEntries: number;
}

Properties

Properties

windowMs: number

Time window in ms to track actions.

Default

3600000 (1 hour)
maxEntries: number

Maximum tracked entries before LRU eviction.

Default

10000