shahar1 opened a new pull request, #1678:
URL: https://github.com/apache/airflow-site/pull/1678
Right after the Git provider 1.0.0 docs were published, a freshly built page
showed `Version: 1.0.0` while its version dropdown still listed `Stable
(0.5.0)`:
- The page HTML is built by Sphinx and served from S3.
- The dropdown is filled client-side from the site-wide
`/_gen/packages-metadata.json`, which is published later by this repository's
`build.yml` (2026-09-29: pages live at 07:33 UTC, JSON at 07:39 UTC).
- Neither response carries `Cache-Control`. Browsers apply heuristic
freshness (10% of the time since `Last-Modified`, about 1.6 h that day) and the
CDN keeps its own copy, so the stale dropdown outlives the publish window by a
lot. In Chrome a plain reload does not refetch the JSON; only a hard reload
does.
Reproduced locally with `python -m http.server` (same headers as production)
and Playwright: navigate, reload, hard reload; only the hard reload picked up
the new JSON.
Two one-line changes:
- `.htaccess`: `Cache-Control: max-age=60` on `packages-metadata.json` only,
wrapped in `<IfModule mod_headers.c>`. Bounds both browser and CDN staleness
and applies to every already-published docs version on the next site publish.
Verified with `httpd:2.4` (`AllowOverride All`): the header is set on that file
and on nothing else.
- `versionSelector.js`: `fetch(..., {cache: "no-cache"})`, so pages built
with a future theme revalidate on every view regardless of server headers (the
`ETag` makes it a 304). This part ships with the next `sphinx_airflow_theme`
version bump; this PR does not bump it.
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Fable 5.1)
Generated-by: Claude Code (Fable 5.1) following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]