# RequestDeduplicator

**Kind:** Class

**Source:** [`atloria-monorepo/packages/api-client/src/utils/deduplication.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/api-client/src/utils/deduplication.ts#L5)

Request deduplication manager
Prevents duplicate requests within a specified time window

## Methods

| Method | Signature | Returns |
|---|---|---|
| `deduplicate` | `deduplicate(method: string, url: string, body: unknown | undefined, executor: () => Promise<T>)` | `Promise<T>` |
| `clear` | `clear()` | `void` |
| `cleanup` | `cleanup()` | `void` |

## Where it refuses work

- `RequestDeduplicator` stops the work with an early return when `pending && now - pending.timestamp < this.windowMs`.
