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 |
|
|
84 | result = cache.get(cache_key) | |
85 |
if |
|
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