Skip to content

Merge the duplicate fetch promise to the original fetch promise #10

@hemant-fundwave

Description

@hemant-fundwave

What?

The library creates a promise for every fetch executed using this, which is added to the queue. Now let's say a new fetch executes which have the same URL, method, and body as another fetch in the queue, which will generally calls server twice for the same data.

To avoid the extra call, it now merges the Promise.resolve of both the fetch and stores the request for both as one in the queue.

Scope

  • fetch-queue
  • custom-functions

Why?

  • to handle duplicate fetch requests, thus reducing the number of fetch calls made

Why now?

  • to enhance performance of custom-functions in the add-ons

Tech

  • TypeScript

Deployment Plan

Current pipelines will suffice

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions