Changeset - fae2108f65e5
[Not reviewed]
default
0 1 0
Mads Kiilerich - 6 years ago 2020-03-30 14:52:01
mads@kiilerich.com
cache: drop unused set_value - it is handled by cache.get_value by calling createfunc
1 file changed with 0 insertions and 6 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/caching_query.py
Show inline comments
 
@@ -96,18 +96,12 @@ class CachingQuery(Query):
 
        cache, cache_key = _get_cache_parameters(self)
 
        ret = cache.get_value(cache_key, createfunc=createfunc)
 
        if merge:
 
            ret = self.merge_result(ret, load=False)
 
        return ret
 

	
 
    def set_value(self, value):
 
        """Set the value in the cache for this query."""
 

	
 
        cache, cache_key = _get_cache_parameters(self)
 
        cache.put(cache_key, value)
 

	
 

	
 
def query_callable(manager, query_cls=CachingQuery):
 
    def query(*arg, **kw):
 
        return query_cls(manager, *arg, **kw)
 
    return query
 

	
0 comments (0 inline, 0 general)