Mercurial > kallithea
comparison rhodecode/model/caching_query.py @ 610:b0a411f5ec70
fixed error message about cache settings
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 12 Oct 2010 16:49:28 +0200 |
parents | c1c1cf772337 |
children | 30d3161c6683 |
comparison
equal
deleted
inserted
replaced
609:c1c1cf772337 | 610:b0a411f5ec70 |
---|---|
107 def query(*arg, **kw): | 107 def query(*arg, **kw): |
108 return CachingQuery(manager, *arg, **kw) | 108 return CachingQuery(manager, *arg, **kw) |
109 return query | 109 return query |
110 | 110 |
111 def get_cache_region(name, region): | 111 def get_cache_region(name, region): |
112 if region not in beaker.cache.cache_regions: | 112 if region not in beaker.cache.cache_regions: |
113 raise BeakerException('Cache region not configured: %s' % region) | 113 raise BeakerException('Cache region not configured: %s' |
114 kw = beaker.cache.cache_regions[region] | 114 'Check if proper cache settings are in the .ini files' % region) |
115 return beaker.cache.Cache._get_cache(name, kw) | 115 kw = beaker.cache.cache_regions[region] |
116 | 116 return beaker.cache.Cache._get_cache(name, kw) |
117 | |
117 def _get_cache_parameters(query): | 118 def _get_cache_parameters(query): |
118 """For a query with cache_region and cache_namespace configured, | 119 """For a query with cache_region and cache_namespace configured, |
119 return the correspoinding Cache instance and cache key, based | 120 return the correspoinding Cache instance and cache key, based |
120 on this query's current criterion and parameter values. | 121 on this query's current criterion and parameter values. |
121 | 122 |