diff --git a/djblets/mail/testing.py b/djblets/mail/testing.py
index 629b968d4d43b11646205f308f3337f9056e65d1..caf75fa7f4b6dadaa46ab58ecef32fa5b7e733d8 100644
--- a/djblets/mail/testing.py
+++ b/djblets/mail/testing.py
@@ -40,8 +40,6 @@ class DmarcDnsTestsMixin(MixinParentClass):
     dmarc_txt_records: Dict[str, Union[bytes, str]]
 
     def setUp(self) -> None:
-        super().setUp()
-
         self.dmarc_txt_records = {}
 
         self._dmarc_spy_agency = SpyAgency()
@@ -49,6 +47,11 @@ class DmarcDnsTestsMixin(MixinParentClass):
                                       call_fake=self._dns_query)
         cache.clear()
 
+        # This has to happen after we clear the cache. Some other test cases
+        # (such as webapi or siteconfig tests) rely on cached data that gets
+        # set up in their setUp methods.
+        super().setUp()
+
     def tearDown(self) -> None:
         super().tearDown()
 
