From fc467d9d72a6aea01b5040cc18a98db82176a9d5 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 21 Jan 2022 14:24:27 +0200 Subject: [PATCH] gfd --- files/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/__main__.py b/files/__main__.py index e58ed4284..301b743c0 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -109,6 +109,8 @@ def after_request(response): response.headers.add("X-Frame-Options", "deny") return response -with open("marsey_count.json", 'r') as f: cache.set("marsey_count", loads(f.read())) +if cache.get("marsey_count") == None: + with open("marsey_count.json", 'r') as f: + cache.set("marsey_count", loads(f.read())) from files.routes import * \ No newline at end of file