Skip to content

Commit da8e765

Browse files
authored
Merge pull request #25289 from meeseeksmachine/auto-backport-of-pr-25286-on-v3.7.x
Backport PR #25286 on branch v3.7.x (DOC: add cache-busting query to switcher json url)
2 parents cf4a57a + 24013b0 commit da8e765

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,11 @@ def js_tag_with_cache_busting(js):
397397
"collapse_navigation": not is_release_build,
398398
"show_prev_next": False,
399399
"switcher": {
400-
"json_url": "https://matplotlib.org/devdocs/_static/switcher.json",
400+
# Add a unique query to the switcher.json url. This will be ignored by
401+
# the server, but will be used as part of the key for caching by browsers
402+
# so when we do a new minor release the switcher will update "promptly" on
403+
# the stable and devdocs.
404+
"json_url": f"https://matplotlib.org/devdocs/_static/switcher.json?{SHA}",
401405
"version_match": (
402406
# The start version to show. This must be in switcher.json.
403407
# We either go to 'stable' or to 'devdocs'

0 commit comments

Comments
 (0)