Don't cache CACHE_KEY_CATALOG_ERROR if ISOLATED_DEPLOYMENT is True

This commit is contained in:
Brian Tiemann 2025-01-09 14:04:03 -05:00 committed by Jeremy Stretch
parent 571f604ce8
commit 32422d1683

View File

@ -594,7 +594,7 @@ class BasePluginView(UserPassesTestMixin, View):
catalog_plugins_error = cache.get(self.CACHE_KEY_CATALOG_ERROR, default=False) catalog_plugins_error = cache.get(self.CACHE_KEY_CATALOG_ERROR, default=False)
if not catalog_plugins_error: if not catalog_plugins_error:
catalog_plugins = get_catalog_plugins() catalog_plugins = get_catalog_plugins()
if not catalog_plugins: if not catalog_plugins and not settings.ISOLATED_DEPLOYMENT:
# Cache for 5 minutes to avoid spamming connection # Cache for 5 minutes to avoid spamming connection
cache.set(self.CACHE_KEY_CATALOG_ERROR, True, 300) cache.set(self.CACHE_KEY_CATALOG_ERROR, True, 300)
messages.warning(request, _("Plugins catalog could not be loaded")) messages.warning(request, _("Plugins catalog could not be loaded"))