Add either (they are equivalent):
// src/app/components/page.tsx ─ very top of the file
export const revalidate = 0; // Renders on **every** request
// --- or ---
export const dynamic = 'force-dynamic'; // Opt-out of Full-Route + Data cacherevalidate = 0 / dynamic = 'force-dynamic' skips both the Full Route Cache and the Data Cache, so the server calls your RSC again each hit. Only the tiny client-side Router cache is left, and that clears on hard-reloads.
Next only auto-caches fetch() calls. Because you’re using the Contentful SDK (client.getEntries()), mark the segment as uncached yourself:
// src/lib/contentful/client.ts
import { unstable_noStore as noStore } from 'next/cache';
export const getPremierPartners = async () => {
noStore(); // <- forces fresh call each request
return (await client.getEntries({ content_type: 'marketplaceBlockPremierPartner' })).items;
};If you ever switch to plain fetch, add { cache: 'no-store' } or revalidate: 0 to the fetch options instead.
Netlify persists .next/cache, node_modules, etc. between builds. For a truly clean rebuild:
-
One-off: Deploys → Trigger deploy → “Clear cache and deploy site” in the UI (or run
netlify deploy --build --clearCache --context=stagingfrom the CLI). -
Every build: set an env var to skip the cache:
# netlify.toml [build.environment] NETLIFY_NEXT_PLUGIN_CACHE = "false" # plugin won’t restore .next/cache
(If you also use the community netlify-plugin-cache-nextjs, remove or disable it.)
Static assets are fingerprinted, so they don’t need purging. For SSR responses you can invalidate on demand via the Netlify API:
curl -X POST \
-H "Authorization: Bearer $NETLIFY_AUTH_TOKEN" \
-d '{}' \
https://api.netlify.com/api/v1/sites/<site_id>/purgeCacheThis avoids a full redeploy and clears the edge cache in seconds.
Put the opts behind an env check so production can still use ISR if you want:
export const revalidate = process.env.NEXT_PUBLIC_STAGE === 'staging' ? 0 : 3600 // 1 h in prod- Next:
export const revalidate = 0ordynamic = 'force-dynamic'+noStore() - Netlify build cache: “Clear cache and deploy” or
NETLIFY_NEXT_PLUGIN_CACHE=false - Netlify CDN cache (SSR): optional
purgeCacheAPI call
With those switches flipped, your staging environment will always render the very latest Contentful / RaaS data on every request, no manual hard-refreshes required.