perf!: simpler frappe.get_system_setting (#16685)
Not sure why this needs to be "cached" in locals again when db object already caches it in value_cache.
This commit is contained in:
parent
620a944104
commit
dcee40046a
2 changed files with 1 additions and 5 deletions
|
|
@ -217,7 +217,6 @@ def init(site, sites_path=None, new_site=False):
|
|||
|
||||
local.module_app = None
|
||||
local.app_modules = None
|
||||
local.system_settings = _dict()
|
||||
|
||||
local.user = None
|
||||
local.user_perms = None
|
||||
|
|
@ -2139,9 +2138,7 @@ def safe_eval(code, eval_globals=None, eval_locals=None):
|
|||
|
||||
|
||||
def get_system_settings(key):
|
||||
if key not in local.system_settings:
|
||||
local.system_settings.update({key: db.get_single_value("System Settings", key)})
|
||||
return local.system_settings.get(key)
|
||||
return db.get_single_value("System Settings", key, cache=True)
|
||||
|
||||
|
||||
def get_active_domains():
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ class SystemSettings(Document):
|
|||
|
||||
frappe.cache().delete_value("system_settings")
|
||||
frappe.cache().delete_value("time_zone")
|
||||
frappe.local.system_settings = {}
|
||||
|
||||
if frappe.flags.update_last_reset_password_date:
|
||||
update_last_reset_password_date()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue