def invalidate_contest(contest: Contest):
contest_users = contest.participants_ids
cache.delete_many(list(map(lambda x: PARTICIPANT_RANK_DETAIL.format(contest=contest.pk, user=x), contest_users)))
cache.delete_many(
list(map(lambda x: PARTICIPANT_RANK_DETAIL_PRIVATE.format(contest=contest.pk, user=x), contest_users)))
cache.delete(PARTICIPANT_RANK_LIST.format(contest=contest.pk))
cache.delete(CONTEST_FIRST_YES.format(contest=contest.pk))
评论列表
文章目录