| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .gitignore | ||
| .prettierrc.mjs | ||
| README.md | ||
| bun.lockb | ||
| index.html | ||
| package.json | ||
| pnpm-lock.yaml | ||
| postcss.config.js | ||
| tailwind.config.js | ||
| vercel.json | ||
| vite.config.js |
Add request deduplication mechanism to prevent duplicate GET requests to the same endpoint within the same timeframe, significantly reducing unnecessary network overhead. **Changes:** - Add `patchAPIInstance()` function to intercept and deduplicate GET requests - Implement in-flight request tracking using Map with URL+params as unique keys - Apply deduplication patch to both initial API instance and `updateAPI()` recreated instances - Add `disableDuplicate: true` config option to bypass deduplication when needed **Benefits:** - Eliminates redundant API calls caused by component re-renders or rapid user interactions - Reduces server load and improves application performance - Provides automatic protection against accidental duplicate requests - Maintains backward compatibility with existing code **Technical Details:** - Uses Promise sharing for identical concurrent requests - Automatically cleans up completed requests from tracking map - Preserves original axios functionality with minimal overhead - Zero breaking changes to existing API usage Addresses the issue observed in EditChannel.js where multiple calls were made to the same endpoints during component lifecycle.
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| public | Loading commit data... | |
| src | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .prettierrc.mjs | Loading commit data... | |
| README.md | Loading commit data... | |
| bun.lockb | Loading commit data... | |
| index.html | Loading commit data... | |
| package.json | Loading commit data... | |
| pnpm-lock.yaml | Loading commit data... | |
| postcss.config.js | Loading commit data... | |
| tailwind.config.js | Loading commit data... | |
| vercel.json | Loading commit data... | |
| vite.config.js | Loading commit data... |