Fixed #34687 -- Made Apps.clear_cache() clear get_swappable_settings_name() cache.
diff --git a/AUTHORS b/AUTHORS
index 2148c64322a45..40df3589c024d 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -747,6 +747,7 @@ answer newbie questions, and generally made Django that much better:
     Nicolas Lara <nicolaslara@gmail.com>
     Nicolas Noé <nicolas@niconoe.eu>
     Nikita Marchant <nikita.marchant@gmail.com>
+    Nikita Sobolev <mail@sobolevn.me>
     Niran Babalola <niran@niran.org>
     Nis Jørgensen <nis@superlativ.dk>
     Nowell Strite <https://nowell.strite.org/>
diff --git a/django/apps/registry.py b/django/apps/registry.py
index 0683f3ad3ccb3..92de6075fc90a 100644
--- a/django/apps/registry.py
+++ b/django/apps/registry.py
@@ -373,6 +373,7 @@ def clear_cache(self):
 
         This is mostly used in tests.
         """
+        self.get_swappable_settings_name.cache_clear()
         # Call expire cache on each model. This will purge
         # the relation tree and the fields cache.
         self.get_models.cache_clear()
diff --git a/tests/apps/tests.py b/tests/apps/tests.py
index 9f989c5d9a854..ecfb70162ff26 100644
--- a/tests/apps/tests.py
+++ b/tests/apps/tests.py
@@ -197,6 +197,17 @@ def test_get_model(self):
         with self.assertRaises(ValueError):
             apps.get_model("admin_LogEntry")
 
+    @override_settings(INSTALLED_APPS=SOME_INSTALLED_APPS)
+    def test_clear_cache(self):
+        # Set cache.
+        self.assertIsNone(apps.get_swappable_settings_name("admin.LogEntry"))
+        apps.get_models()
+
+        apps.clear_cache()
+
+        self.assertEqual(apps.get_swappable_settings_name.cache_info().currsize, 0)
+        self.assertEqual(apps.get_models.cache_info().currsize, 0)
+
     @override_settings(INSTALLED_APPS=["apps.apps.RelabeledAppsConfig"])
     def test_relabeling(self):
         self.assertEqual(apps.get_app_config("relabeled").name, "apps")

When `django.apps.apps.clear_cache()` is called,
we now also clean the cache of `@functools.cache`
of `get_swappable_settings_name` method.

Original issue https://code.djangoproject.com/ticket/34687
Refs https://github.com/typeddjango/django-stubs/pull/1601