From ac618d1bb5f8b28ca8766e5ce6e25642f8a36539 Mon Sep 17 00:00:00 2001 From: "Jonathan S. Katz" Date: Thu, 9 Feb 2023 12:57:04 -0500 Subject: [PATCH] Purge the release notes cache when a minor version is updated Typically this required a user (especially the committer) to manually do this step, which was easily and often missed. This limits user error and ensures the release notes are available to users in a timely manner. Reviewed-by: Magnus Hagander --- pgweb/core/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pgweb/core/models.py b/pgweb/core/models.py index 317031d1..2ef2692b 100644 --- a/pgweb/core/models.py +++ b/pgweb/core/models.py @@ -99,6 +99,12 @@ class Version(models.Model): yield '/about/featurematrix/$' yield '/versions.rss' yield '/versions.json' + # the next two purge the cache for the release notes. + # note that we need to purge all the release notes for a major version + # tree as we currently have a sidebar that links to all of the minor + # versions within a tree on an individual release notes page. + yield '/docs/release/{:.0f}'.format(self.tree) + yield '/docs/release/$' def purge_xkeys(self): yield 'pgdocs_all' -- 2.39.5