Overview
SanMarcSoft sites behind Cloudflare CDN require cache purging after deployments to serve fresh content. This applies to all sites using Cloudflare proxy (orange cloud).
Prerequisites
- Cloudflare API token:
pass cloudflare/api-token - Zone ID for the target domain
Procedure: Purge Everything
Use this after a full deployment when all assets may have changed.
| |
Expected Response
| |
Procedure: Selective Purge (By URL)
Use when only specific files changed:
| |
Procedure: Purge by Tag
If cache tags are configured:
| |
Procedure: Purge by Prefix
Purge all cached assets under a path prefix:
| |
Post-Deployment Purge Checklist
After every production deployment:
- Deploy the new version (Pulumi, wrangler, etc.)
- Wait 10-30 seconds for the new version to stabilize
- Purge the Cloudflare cache (purge everything for major releases)
- Verify the new version is served:
1 2 3# Check response headers for cache status curl -sI https://verifieddit.com/ | grep -i "cf-cache-status" # Should show: cf-cache-status: MISS (first request after purge) - Request the page again to re-populate cache:
1 2curl -sI https://verifieddit.com/ | grep -i "cf-cache-status" # Should show: cf-cache-status: HIT
Domains Requiring Cache Purge After Deploy
| Domain | Deployed Via | Purge After |
|---|---|---|
| verifieddit.com | Scaleway Container | Yes |
| sanmarcsoft.com | Cloudflare Pages | Automatic |
| trusteddit.com | Cloudflare Pages | Automatic |
Note: Cloudflare Pages deployments automatically invalidate the cache. Manual purge is only needed for services behind Scaleway or other origins.
Troubleshooting
- Old content still showing after purge: Browser cache may be holding stale content. Test with
curlor incognito mode. - Purge returns error: Check API token permissions. The token needs “Cache Purge” permission for the zone.
- Partial purge not working: Some assets may be cached at edge locations worldwide. Full propagation can take up to 30 seconds.