Show More
@@ -18,6 +18,7 b'' | |||
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | import logging | |
|
21 | 22 | from dogpile.cache import register_backend |
|
22 | 23 | from dogpile.cache import make_region |
|
23 | 24 | |
@@ -34,6 +35,8 b' register_backend(' | |||
|
34 | 35 | "RedisPickleBackend") |
|
35 | 36 | |
|
36 | 37 | |
|
38 | log = logging.getLogger(__name__) | |
|
39 | ||
|
37 | 40 | from . import region_meta |
|
38 | 41 | from .utils import ( |
|
39 | 42 | get_default_cache_settings, key_generator, get_or_create_region, |
@@ -52,6 +55,7 b' def configure_dogpile_cache(settings):' | |||
|
52 | 55 | for key in rc_cache_data.keys(): |
|
53 | 56 | namespace_name = key.split('.', 1)[0] |
|
54 | 57 | avail_regions.add(namespace_name) |
|
58 | log.debug('dogpile: found following cache regions: %s', avail_regions) | |
|
55 | 59 | |
|
56 | 60 | # register them into namespace |
|
57 | 61 | for region_name in avail_regions: |
@@ -61,6 +65,9 b' def configure_dogpile_cache(settings):' | |||
|
61 | 65 | ) |
|
62 | 66 | |
|
63 | 67 | new_region.configure_from_config(settings, 'rc_cache.{}.'.format(region_name)) |
|
68 | ||
|
69 | log.debug('dogpile: registering a new region %s[%s]', | |
|
70 | region_name, new_region.__dict__) | |
|
64 | 71 | region_meta.dogpile_cache_regions[region_name] = new_region |
|
65 | 72 | |
|
66 | 73 |
General Comments 0
You need to be logged in to leave comments.
Login now