sfnext-revalidation
Control which Storefront Next loaders re-run after an action or navigation: shouldRevalidate exports, the policy modules in src/lib/revalidation/routes (root, cart, product, category, checkout, home, wishlist, api-client, shared), getActionPath and isAmbientMutation, and the tag primitives in src/lib/revalidation/tags (withRevalidateTags, shouldRevalidateForTags, tagGroup, tagImplications). Use for "page re-fetches after add to cart", "loader runs too often", "stale data after a mutation", "flash of skeleton after changing a swatch", "add shouldRevalidate", or when a new action or route changes which loaders fire. Do not use for writing loaders or actions (use storefront-next:sfnext-data-fetching), Suspense and LCP tuning (use storefront-next:sfnext-performance), or client-side state (use storefront-next:sfnext-state-management).
Pinned to revision 0d6b966d3aa9, so it is the text this page describes rather than whatever the author pushed since.
Files
- skills/sfnext-revalidation/SKILL.md
- skills/sfnext-revalidation/evals/trigger-evals.json
- skills/sfnext-revalidation/references/POLICIES-AND-TAGS.md
Every link opens the file at its source, pinned to the revision this page describes.