Changeset - 784d28c9e86e
[Not reviewed]
default
0 1 0
timeless@gmail.com - 10 years ago 2016-05-03 07:11:54
timeless@gmail.com
spelling: depending
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/utils.py
Show inline comments
 
@@ -853,13 +853,13 @@ def conditional_cache(region, prefix, co
 

	
 
    Conditional caching function use like::
 
        def _c(arg):
 
            #heavy computation function
 
            return data
 

	
 
        # denpending from condition the compute is wrapped in cache or not
 
        # depending from condition the compute is wrapped in cache or not
 
        compute = conditional_cache('short_term', 'cache_desc', condition=True, func=func)
 
        return compute(arg)
 

	
 
    :param region: name of cache region
 
    :param prefix: cache region prefix
 
    :param condition: condition for cache to be triggered, and return data cached
0 comments (0 inline, 0 general)