Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: appengine/swarming/server/config.py

Issue 1922073005: swarming: cache settings in main memory (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The LUCI Authors. All rights reserved. 1 # Copyright 2013 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed by the Apache v2.0 license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Instance specific settings.""" 5 """Instance specific settings."""
6 6
7 import logging 7 import logging
8 import posixpath 8 import posixpath
9 9
10 from components import config 10 from components import config
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 return { 99 return {
100 'cfg': cfg, 100 'cfg': cfg,
101 'rev': rev, 101 'rev': rev,
102 'rev_url': rev_url, 102 'rev_url': rev_url,
103 'config_service_url': ( 103 'config_service_url': (
104 'https://%s' % cfg_service_hostname if cfg_service_hostname else '' 104 'https://%s' % cfg_service_hostname if cfg_service_hostname else ''
105 ), 105 ),
106 } 106 }
107 107
108 108
109 @utils.cache_with_expiration(60)
109 def settings(): 110 def settings():
110 """Loads settings from an NDB-based cache or a default one if not present.""" 111 """Loads settings from an NDB-based cache or a default one if not present."""
111 return _get_settings()[1] 112 return _get_settings()[1]
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698