Caching Medusa: What to Cache, Where, and What Never To
Four cache layers, one rule about carts, and the invalidation strategy that stops a price change taking twelve hours to appear.
Articles tagged Storefront — hands-on notes from the commerce builds we ship.
Four cache layers, one rule about carts, and the invalidation strategy that stops a price change taking twelve hours to appear.
The hard part of a commerce-plus-CMS setup is not the sync. It is deciding which system owns each field — and then never letting both own one.
Database search stops working sooner than you expect. Choosing an engine, building the index, and the sync strategy that survives a bulk import.
Regions carry currency, tax, payment methods and shipping. How to model international selling without accidentally creating twelve stores.
Adding PayPal alongside cards, wiring the JS SDK buttons into a Next.js checkout, and the dispute and webhook behaviour that differs from a card processor.
Medusa handles currency and tax per region, not translation. How to layer language onto that — URL structure, product content, and the hreflang most stores get wrong.
Over-fetching, waterfalls and unoptimised images account for most of a slow headless storefront. How to find them and what to do about each.
Headless means you own every SEO decision, including the ones a hosted platform used to make. Metadata, Product schema, canonical rules and the faceted-navigation trap.
Address, shipping, payment session, complete. The four stages of a Medusa checkout, the state machine underneath, and the failure modes that cost orders.
Cart persistence, the guest-to-customer merge, inventory races and optimistic UI. The cart problems that only appear in production, and how to avoid them.
The SDK is thin on purpose. What it handles, how authentication differs between store and admin, and why the fields parameter is the difference between a fast storefront and a slow one.
Server components, caching, cart state and the rendering decisions that determine whether your storefront is fast. The architecture we use on every Medusa build.