python / docsbuild-scripts

scripts for building documentation on docs.python.org
64 stars 58 forks source link

Purge using Surrogate-Key headers #220

Closed AA-Turner closed 1 month ago

AA-Turner commented 1 month ago

This follows on from https://github.com/python/psf-salt/issues/287, where we have added Surrogate-Key headers to all language-version pairs. These are consumed internally by Fastly and can be used to purge an entire set of pages at once, rather than doing so per-page.

I've tested using curl to send the requests manually and it seems to work -- we get a cache hit, purge the surrogate key, and then get a cache miss.

This should also marginally improve build times, but I think the simplification stands alone as a value proposition.

A