From c9563506efa56840b4d5465c9c808768b56b961a Mon Sep 17 00:00:00 2001 From: virusdefender Date: Sat, 5 May 2018 22:42:03 +0800 Subject: [PATCH] disable update json cache --- conf/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/views.py b/conf/views.py index b3eaa08..3b5f4cf 100644 --- a/conf/views.py +++ b/conf/views.py @@ -4,6 +4,7 @@ import os import re import shutil import smtplib +import time from datetime import datetime import pytz @@ -208,7 +209,7 @@ class TestCasePruneAPI(APIView): class ReleaseNotesAPI(APIView): def get(self, request): try: - resp = requests.get("https://raw.githubusercontent.com/QingdaoU/OnlineJudge/master/docs/data.json", + resp = requests.get("https://raw.githubusercontent.com/QingdaoU/OnlineJudge/master/docs/data.json?_=" + str(time.time()), timeout=3) releases = resp.json() except (RequestException, ValueError):