deco-api-call-dedup
OfficialCut VTEX calls across Deco storefronts.
System Documentation
What problem does it solve?
Detect and fix duplicate/N+1 API calls in Deco TanStack storefronts. Covers vtexCachedFetch SWR cache for all VTEX GET calls, slugCache via fetchWithCache, cross-selling SWR cache, usePriceSimulationBatch for batching simulation POSTs, PLP path filtering to avoid spurious pagetype calls, pageType dedup, site loader registration, cachedLoader inflight dedup in dev mode, and HAR analysis techniques. Use when server logs show repeated VTEX API calls, PDP/PLP loads trigger excessive calls, simulation calls happen one-by-one, or "Unhandled resolver" warnings appear.
Core Features & Use Cases
- In-depth VTEX API call deduplication across common storefront workflows including PDP, PLP, and related sections.
- Batched operations (price simulations, cross-sell lookups) and in-flight dedup to minimize latency and server load.
- Observability & HAR-based diagnosis to locate N+1 patterns and guide fixes.
Quick Start
Run the deco-api-call-dedup patterns to reduce VTEX API calls by enabling vtexCachedFetch, slugCache, and batch simulations across PDP/PLP.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: deco-api-call-dedup Download link: https://github.com/decocms/deco-start/archive/main.zip#deco-api-call-dedup Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.