Changeset - b0a411f5ec70
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 15 years ago 2010-10-12 16:49:28
marcin@python-works.com
fixed error message about cache settings
1 file changed with 6 insertions and 5 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/caching_query.py
Show inline comments
 
@@ -106,17 +106,18 @@ class CachingQuery(Query):
 
def query_callable(manager):
 
    def query(*arg, **kw):
 
        return CachingQuery(manager, *arg, **kw)
 
    return query
 

	
 
def get_cache_region(name, region):
 
        if region not in beaker.cache.cache_regions:
 
            raise BeakerException('Cache region not configured: %s' % region)
 
        kw = beaker.cache.cache_regions[region]
 
        return beaker.cache.Cache._get_cache(name, kw)
 
        
 
    if region not in beaker.cache.cache_regions:
 
        raise BeakerException('Cache region not configured: %s'
 
            'Check if proper cache settings are in the .ini files' % region)
 
    kw = beaker.cache.cache_regions[region]
 
    return beaker.cache.Cache._get_cache(name, kw)
 
    
 
def _get_cache_parameters(query):
 
    """For a query with cache_region and cache_namespace configured,
 
    return the correspoinding Cache instance and cache key, based
 
    on this query's current criterion and parameter values.
 

	
 
    """
0 comments (0 inline, 0 general)