Reduce attr cache to 30 seconds instead of 300 secs

is_admin_func_cache_hit
Kevin Chung 2020-04-29 22:48:03 -04:00
parent 46ca4c7283
commit 4a47805c41
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ def get_current_user_attrs():
return None
@cache.memoize()
@cache.memoize(timeout=30)
def get_user_attrs(user_id):
user = Users.query.filter_by(id=user_id).first()
if user:
@ -53,7 +53,7 @@ def get_current_team_attrs():
return None
@cache.memoize()
@cache.memoize(timeout=30)
def get_team_attrs(team_id):
team = Teams.query.filter_by(id=team_id).first()
if team: