diff --git a/frappe/__init__.py b/frappe/__init__.py index 3ee988c15f..245b15f486 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -2347,8 +2347,13 @@ def get_website_settings(key): def get_system_settings(key: str): """Return the value associated with the given `key` from System Settings DocType.""" if not (system_settings := getattr(local, "system_settings", None)): + key = get_document_cache_key("System Settings", "System Settings") try: - local.system_settings = system_settings = get_cached_doc("System Settings") + system_settings = client_cache.get_value(key) + if not system_settings: + system_settings = frappe.get_doc("System Settings") + client_cache.set_value(key, system_settings) + local.system_settings = system_settings except DoesNotExistError: # possible during new install clear_last_message() return