diff --git a/CTFd/cache/__init__.py b/CTFd/cache/__init__.py index 19d8047..9ea10e0 100644 --- a/CTFd/cache/__init__.py +++ b/CTFd/cache/__init__.py @@ -58,7 +58,19 @@ def clear_user_session(user_id): cache.delete_memoized(get_user_attrs, user_id=user_id) +def clear_all_user_sessions(): + from CTFd.utils.user import get_user_attrs + + cache.delete_memoized(get_user_attrs) + + def clear_team_session(team_id): from CTFd.utils.user import get_team_attrs cache.delete_memoized(get_team_attrs, team_id=team_id) + + +def clear_all_team_sessions(): + from CTFd.utils.user import get_team_attrs + + cache.delete_memoized(get_team_attrs)