Change problem AC update time to 5 min
This commit is contained in:
parent
a27a75e887
commit
2e28b92759
1 changed files with 2 additions and 2 deletions
|
@ -39,7 +39,7 @@ def user_completed_ids(profile):
|
|||
if result is None:
|
||||
result = set(Submission.objects.filter(user=profile, result='AC', points=F('problem__points'))
|
||||
.values_list('problem_id', flat=True).distinct())
|
||||
cache.set(key, result, 86400)
|
||||
cache.set(key, result, 300)
|
||||
return result
|
||||
|
||||
|
||||
|
@ -65,7 +65,7 @@ def user_attempted_ids(profile):
|
|||
.values_list('problem__id', 'problem__points')
|
||||
.annotate(points=Max('points'))
|
||||
.filter(points__lt=F('problem__points')))}
|
||||
cache.set(key, result, 86400)
|
||||
cache.set(key, result, 300)
|
||||
return result
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue