Cache Staleness Runbook
If you publish content in the GN-Apex dashboard but your live website still reflects the old data, one of the 4 invalidation tiers has failed. Follow this SRE sequence to identify and clear the blockage.
“Remember: If you did not explicitly set revalidateTime: 60 in your client config, GN-Apex caches content infinitely. You MUST rely on the webhook handshake to clear it.”
Symptoms & Diagnosis
Before purging clusters, isolate where the cache is stuck:
- Client Memory Cache: Try hard-refreshing your browser (Cmd+Shift+R). If the content updates, the issue is an expired WebSocket SSE connection.
- Server Edge Cache: If the hard refresh still shows old content, the Next.js Data Cache or Cloudflare Edge CDN is serving a stale payload.
Step 1: Verify the ISR Webhook
When you click Publish, the GN-Apex Control Plane fires a cryptographic ping to your website to clear Next.js tags.
Inspect Application Logs
Check your Next.js server logs (or Vercel/Cloudflare Pages dashboard). You should see a request to GET /api/revalidate?projectId=... returning HTTP 200.
401 Unauthorized Handshake, your Next.js environment variable NEXT_PUBLIC_NEXUS_KEY does not match the active secret key (nx_sk_...) stored in the GN-Apex control plane.Step 2: Execute Direct R2 Purge
If you are deploying on Cloudflare Pages using @opennextjs/cloudflare, the Next.js Data Cache is stored in an R2 bucket ([subdomain]-cache-r2). If the ISR webhook fails, you can bypass the Next.js runtime entirely and delete the cache files directly from storage:
Navigate to Project Settings → Advanced Operations.
Click Purge Edge Storage Cache. This executes S3 DeleteObjects commands to wipe the incremental-cache folder instantly.
Step 3: Validate Cloudflare Edge Purge
If the R2 bucket is empty but the site is stillstale, the HTML is stuck in Cloudflare's global CDN edge nodes.
Verify that your CLOUDFLARE_ZONE_ID and CLOUDFLARE_API_TOKEN are correctly configured in the backend environment. If GN-Apex lacks permission to hit the Cloudflare /purge_cache API, it cannot evict the edge HTML.