Mercurial > kallithea
annotate rhodecode/lib/app_globals.py @ 3774:60335b702a00 beta
invalidation: don't create CacheInvalidation records on startup
Creating the records early gave an advantage before lightweight was introduced.
With lightweight it is no longer necessary.
The records will be created on demand anyway and there is no reason to create and
maintain them before they are used.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 03 Apr 2013 15:56:12 +0200 |
parents | c1516b35f91d |
children | ffd45b185016 |
rev | line source |
---|---|
0 | 1 """The application's Globals object""" |
113
b6e219f3a58d
removed ununsed imports
Marcin Kuzminski <marcin@python-works.com>
parents:
112
diff
changeset
|
2 |
43 | 3 from beaker.cache import CacheManager |
4 from beaker.util import parse_cache_config_options | |
5 | |
1307 | 6 |
0 | 7 class Globals(object): |
8 """Globals acts as a container for objects available throughout the | |
9 life of the application | |
10 | |
11 """ | |
12 | |
43 | 13 def __init__(self, config): |
0 | 14 """One instance of Globals is created during application |
15 initialization and is available during requests via the | |
16 'app_globals' variable | |
17 | |
18 """ | |
43 | 19 self.cache = CacheManager(**parse_cache_config_options(config)) |
341
1ef52a70f3b7
Made config file free configuration based on database and capable of beeing manage via application settings + some code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents:
241
diff
changeset
|
20 self.available_permissions = None # propagated after init_model |