Show More
@@ -62,24 +62,25 b' def configure_dogpile_cache(settings):' | |||
|
62 | 62 | avail_regions = set() |
|
63 | 63 | for key in rc_cache_data.keys(): |
|
64 | 64 | namespace_name = key.split('.', 1)[0] |
|
65 | avail_regions.add(namespace_name) | |
|
66 | log.debug('dogpile: found following cache regions: %s', avail_regions) | |
|
65 | if namespace_name in avail_regions: | |
|
66 | continue | |
|
67 | 67 | |
|
68 | # register them into namespace | |
|
69 | for region_name in avail_regions: | |
|
68 | avail_regions.add(namespace_name) | |
|
69 | log.debug('dogpile: found following cache regions: %s', namespace_name) | |
|
70 | ||
|
70 | 71 | new_region = make_region( |
|
71 |
name= |
|
|
72 | name=namespace_name, | |
|
72 | 73 | function_key_generator=None |
|
73 | 74 | ) |
|
74 | 75 | |
|
75 |
new_region.configure_from_config(settings, 'rc_cache.{}.'.format( |
|
|
76 | new_region.configure_from_config(settings, 'rc_cache.{}.'.format(namespace_name)) | |
|
76 | 77 | new_region.function_key_generator = backend_key_generator(new_region.actual_backend) |
|
77 | 78 | if log.isEnabledFor(logging.DEBUG): |
|
78 | 79 | region_args = dict(backend=new_region.actual_backend.__class__, |
|
79 | 80 | region_invalidator=new_region.region_invalidator.__class__) |
|
80 |
log.debug('dogpile: registering a new region `%s` %s', |
|
|
81 | log.debug('dogpile: registering a new region `%s` %s', namespace_name, region_args) | |
|
81 | 82 | |
|
82 |
region_meta.dogpile_cache_regions[ |
|
|
83 | region_meta.dogpile_cache_regions[namespace_name] = new_region | |
|
83 | 84 | |
|
84 | 85 | |
|
85 | 86 | def includeme(config): |
General Comments 0
You need to be logged in to leave comments.
Login now