Debian Codegraph @

tests/test_namespacing_files/namespace_get.py

raw symbols SCIP
1 from beaker.cache import CacheManager
2 from beaker.util import parse_cache_config_options
3 from datetime import datetime
4
5 defaults = {'cache.data_dir':'./cache', 'cache.type':'dbm', 'cache.expire': 60, 'cache.regions': 'short_term'}
6
7 cache = CacheManager(**parse_cache_config_options(defaults))
8
9 def get_cached_value():
10 @cache.region('short_term', 'test_namespacing')
11 def get_value():
12 return datetime.now()
13
14 return get_value()
15