Total Complexity | 5 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from dogpile.cache import make_region |
||
2 | |||
3 | tree_region = make_region() |
||
4 | list_region = make_region() |
||
5 | |||
6 | |||
7 | def includeme(config): |
||
8 | settings = config.registry.settings |
||
9 | if not tree_region.is_configured: |
||
10 | tree_region.configure_from_config(settings, 'cache.tree.') |
||
11 | if not list_region.is_configured: |
||
12 | list_region.configure_from_config(settings, 'cache.list.') |
||
13 | |||
14 | |||
15 | def invalidate_scheme_cache(conceptscheme_id): |
||
16 | # TODO implement propper conceptscheme cache invalidation if this is ever possible |
||
17 | tree_region.invalidate() |
||
18 | |||
19 | |||
20 | def invalidate_cache(): |
||
21 | tree_region.invalidate() |
||
22 |