Skip to content

RequestDeduplicator

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/packages/api-client/src/utils/deduplication.ts

Request deduplication manager Prevents duplicate requests within a specified time window

Methods

MethodSignatureReturns
deduplicate`deduplicate(method: string, url: string, body: unknownundefined, executor: () => Promise)`
clearclear()void
cleanupcleanup()void

Where it refuses work

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

Was this page helpful?

Download as PDF