Skip to content

Commit

Permalink
Updated caching
Browse files Browse the repository at this point in the history
  • Loading branch information
BadgerHobbs committed Dec 25, 2021
1 parent 5dcbf21 commit 70cd4ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flask_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,13 @@ def ClearCache():
global cache

if request.args.get("key") == "12345":
cache = {}
RefreshCache()

return json.dumps(CacheToDict())
return json.dumps(CacheToDict())

else:
return json.dumps({"error": "Invalid key"})

@app.route("/v1/countries")
def GetCountries():
Expand Down

0 comments on commit 70cd4ff

Please sign in to comment.