Files
postgres-web/docs/xkey.rst
Magnus Hagander fc1d49da21 Add proper xkey tags to docs 404 pages
Since we purge docs pages based on the version they are for, we need to
tag the 404 pages with version as well, when available. Without that,
any page that had been requested returning a 404 (such as somebody or
some tool polling for release notes on a version that hasn't been
released yet) would not get purged when new docs are loaded, which
results in the 404 staying around even after the actual docs are
updated.
2021-08-16 14:17:10 +02:00

28 lines
1.1 KiB
ReStructuredText

xkey keys
=========
xkey keys are used to do smart Varnish purging. A single key can be
assigned to multiple pages, and when the key is purged all those pages
are purged at the same time.
The following xkeys are in use (more to come in the future probably)
pgwt_<hash>
These keys are automatically assigned based on the md5 of the
template(s) in use on the page. One xkey is added for each template,
so a typical page has a set of them. This makes purging fully
automatic when a template is updated -- the system will
automatically figure out which templates are changed and purge the
corresponding hashes.
pgdocs_current
Set on all documentation pages that are in the current version at
the time of setting.
pgdocs_all
Set on documentation pages that are cross-version, such as index pages,
as well as on 404 pages for versions that is unknown (in case this version
is loaded later).
pgdocs_<version>
Set on documentation of the specified version.
pgdocs_pdf
Set on documentation pages that reference the existance or size of
documentation PDFs.