# HG changeset patch # User Marcin Kuzminski # Date 2016-06-23 10:33:04 # Node ID 3c0e100a5fc63c413d158515fbda4cbea6480e50 # Parent f75d6c26db71e401176a529e4d9488272654a2e2 settings: use cached settings in few places we only often use it for reading. diff --git a/rhodecode/lib/base.py b/rhodecode/lib/base.py --- a/rhodecode/lib/base.py +++ b/rhodecode/lib/base.py @@ -255,7 +255,7 @@ class BasicAuth(AuthBasicAuthenticator): def attach_context_attributes(context): - rc_config = SettingsModel().get_all_settings() + rc_config = SettingsModel().get_all_settings(cache=True) context.rhodecode_version = rhodecode.__version__ context.rhodecode_edition = config.get('rhodecode.edition') @@ -425,7 +425,7 @@ class BaseController(WSGIController): _route_name = '.'.join([environ['pylons.routes_dict']['controller'], environ['pylons.routes_dict']['action']]) - self.rc_config = SettingsModel().get_all_settings() + self.rc_config = SettingsModel().get_all_settings(cache=True) self.ip_addr = get_ip_addr(environ) # The rhodecode auth user is looked up and passed through the