##// END OF EJS Templates
Simplify cache method
neko259 -
r2027:d4002835 default
parent child Browse files
Show More
@@ -81,10 +81,8 b' def cached_result(key_method=None):'
81
81
82 cache_key = CACHE_KEY_DELIMITER.join(cache_key_params)
82 cache_key = CACHE_KEY_DELIMITER.join(cache_key_params)
83
83
84 persisted_result = cache.get(cache_key)
84 result = cache.get(cache_key)
85 if persisted_result is not None:
85 if result is None:
86 result = persisted_result
87 else:
88 result = function(obj, *args, **kwargs)
86 result = function(obj, *args, **kwargs)
89 if result is not None:
87 if result is not None:
90 cache.set(cache_key, result)
88 cache.set(cache_key, result)
General Comments 0
You need to be logged in to leave comments. Login now