From 70cd4ff156328d5d5ee05d994d41063272c1641c Mon Sep 17 00:00:00 2001 From: BadgerHobbs Date: Sat, 25 Dec 2021 13:34:06 +0000 Subject: [PATCH] Updated caching --- flask_api.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flask_api.py b/flask_api.py index 4556115..c39f9e2 100644 --- a/flask_api.py +++ b/flask_api.py @@ -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():