diff --git a/wagtail/wagtailadmin/tests/tests.py b/wagtail/wagtailadmin/tests/tests.py index 07fea53e7..834c20de5 100644 --- a/wagtail/wagtailadmin/tests/tests.py +++ b/wagtail/wagtailadmin/tests/tests.py @@ -35,6 +35,7 @@ class TestHome(TestCase, WagtailTestUtils): self.assertIn('private', response['Cache-Control']) self.assertIn('no-cache', response['Cache-Control']) self.assertIn('no-store', response['Cache-Control']) + self.assertIn('max-age=0', response['Cache-Control']) class TestEditorHooks(TestCase, WagtailTestUtils): diff --git a/wagtail/wagtailadmin/urls.py b/wagtail/wagtailadmin/urls.py index efcf1bc70..3a1c577e8 100644 --- a/wagtail/wagtailadmin/urls.py +++ b/wagtail/wagtailadmin/urls.py @@ -121,5 +121,5 @@ urlpatterns += [ # Decorate all views with cache settings to prevent caching urlpatterns = decorate_urlpatterns(urlpatterns, - cache_control(private=True, no_cache=True, no_store=True) + cache_control(private=True, no_cache=True, no_store=True, max_age=0) )