Courier

Cache the price lookupDone

The product page calls the pricing service on every render. Cache prices for 60 s, keyed by SKU and currency.

  1. SearchedgetPrice( in src/
  2. Readsrc/pricing/client.ts
  3. Readsrc/pages/product.tsx
  4. Ranpnpm test pricing · 14 passed
Edited 3 files+71−3

Prices are cached for 60 s per SKU and currency, so a product page now makes one pricing call a minute instead of one per render. The new test covers a hit and an expired entry.

← Courier