Result not cached

master
Yohann Dedy 2020-04-12 20:11:03 +02:00
parent 7dc3953197
commit b42dd38603
1 changed files with 3 additions and 4 deletions

7
app.py
View File

@ -67,10 +67,9 @@ def index():
@app.route('/getVideos')
def get_videos():
global liste_videos
# if dateliste not tropjeune or not liste_videos:
if not liste_videos:
token = get_token()
liste_videos = update_video_list(token)
# Faire en sorte de garder le résultat temporairement en cache
token = get_token()
liste_videos = update_video_list(token)
return(json.dumps(liste_videos))
if __name__ == '__main__':