Skip to content

Commit

Permalink
Merge pull request #201 from swsnu/#200_fix/delete-cache
Browse files Browse the repository at this point in the history
#200 fix/delete cache
  • Loading branch information
Junetrbl authored Dec 7, 2021
2 parents a3c7451 + ee74360 commit 43d4e97
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions backend/gaejosim/report/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
name="report_auth",
),
path("reports/", views.post_report, name="report"),
path("my/reports/", views.my_reports, name="my_reports"),
path("my/reports/", cache_page(300)(views.my_reports), name="my_reports"),
path(
"my/received_reports/",
cache_page(600)(views.my_received_reports),
cache_page(300)(views.my_received_reports),
name="my_received_reports",
),
]
6 changes: 2 additions & 4 deletions backend/gaejosim/search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ def search(request):
if summoner_league_req.json() != []:
for league_dto in summoner_league_req.json():
if league_dto["queueType"] == "RANKED_SOLO_5x5":
tier = {"tier": league_dto["tier"],
"rank": league_dto["rank"]}
tier = {"tier": league_dto["tier"], "rank": league_dto["rank"]}
break

matches_by_summoner_url = (
Expand All @@ -94,8 +93,7 @@ def search(request):

if matches_by_summoner_list != []:
task = [
get_match_result(match, summoner_puuid,
recent_result, recent_win_lose)
get_match_result(match, summoner_puuid, recent_result, recent_win_lose)
for match in matches_by_summoner_list
]
asyncio.run(asyncio.wait(task))
Expand Down
2 changes: 1 addition & 1 deletion backend/gaejosim/user/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
path("change/password/", views.change_password, name="change_password"),
path("forgot/id/", views.find_username, name="find username"),
path("forgot/password/", views.find_password, name="find password"),
path("mypage/", cache_page(600)(views.my_page), name="my page"),
path("mypage/", cache_page(300)(views.my_page), name="my page"),
path("update/summoner/", views.update_summoner_name, name="update summoner name"),
]
3 changes: 3 additions & 0 deletions backend/gaejosim/user/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from django.views.decorators.http import require_http_methods
from django.contrib.auth.hashers import check_password
from django.core.mail.message import EmailMessage
from django.core.cache import cache


from report.models import Report
from core.utils import check_logged_in
Expand Down Expand Up @@ -212,6 +214,7 @@ def generate_temp_password():
def log_out(request):
"""sign out"""
logout(request)
cache.clear()

return JsonResponse({"message": "로그아웃이 완료되었습니다."}, status=200)

Expand Down

0 comments on commit 43d4e97

Please sign in to comment.