Direct Answer
To guarantee fresh output after a commit, you must clear three independent cache layers:
- Read the Docs build cache for the affected version — trigger a forced rebuild via dashboard or API.
- CDN/edge cache serving your documentation domain — purge the relevant paths (or the entire zone) through your CDN provider.
- Intermediate proxy or browser cache — add a cache-busting query parameter (e.g.,
?v=) or instruct users to hard-refresh.
The theme compilation step is not documented as participating in the commit-hash cache key. Assume theme assets can be reused across commits unless Read the Docs explicitly hashes theme versions.
Programmatically, call the Read the Docs API /api/v3/projects/{project}/versions/{version}/builds/ endpoint. Compare the commit field of the latest successful build (state=finished) against your repository's current HEAD. No dedicated "stale" flag exists in the API.
Likely Explanation vs. Confirmed Facts
Likely (reported, not verified)
- Per-branch cache key is primarily the repository commit hash.
- Compiled theme assets are excluded from that key, so theme-only changes can survive a commit-triggered rebuild.
- Behavior described for Read the Docs 23.x and later.
Confirmed (general platform behavior)
- Build artifacts are stored per project and version; a successful rebuild does not automatically invalidate CDN edge caches.
- CDN retention is independent of the build cache.
- API returns build records with commit hash, state, and finished timestamp.
Steps to Resolve This Case
- Force a rebuild of the affected version (dashboard → "Build version" or
POST /api/v3/projects/{project}/versions/{version}/builds/). - Verify the new build record shows the latest commit hash.
- Purge the CDN for the documentation URL (e.g.,
https://your-docs.example.com/*). - Request the page with a cache-busting query (
?v=abc1234) and confirm updated content appears. - Inspect response headers (
Age, Cache-Control, X-Cache) to ensure the CDN serves the new artifact.
One Diagnostic Detail Needed
Which CDN provider fronts your Read the Docs site (Cloudflare, Fastly, AWS CloudFront, Read the Docs default, other)? The purge method and header names differ, so this changes the exact commands for step 3.