Add caching for user basic info
This commit is contained in:
parent
7f854c40dd
commit
ed287b6ff3
15 changed files with 110 additions and 33 deletions
|
@ -40,9 +40,9 @@ def cache_wrapper(prefix, timeout=None):
|
|||
if result == NONE_RESULT:
|
||||
result = None
|
||||
return result
|
||||
result = func(*args, **kwargs)
|
||||
if result is None:
|
||||
result = NONE_RESULT
|
||||
result = func(*args, **kwargs)
|
||||
cache.set(cache_key, result, timeout)
|
||||
return result
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue