From fdb671ac3f87f952eac653fbb683914e175c9d76 Mon Sep 17 00:00:00 2001 From: Zach Parks Date: Sat, 22 Jun 2024 23:29:14 -0500 Subject: [PATCH] WebHost: Disable flask caching if `DEBUG` is enabled. --- WebHost.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WebHost.py b/WebHost.py index 08ef3c430795..09ac256b3e5f 100644 --- a/WebHost.py +++ b/WebHost.py @@ -35,6 +35,9 @@ def get_app() -> "Flask": logging.info("Getting public IP, as HOST_ADDRESS is empty.") app.config["HOST_ADDRESS"] = Utils.get_public_ipv4() logging.info(f"HOST_ADDRESS was set to {app.config['HOST_ADDRESS']}") + if app.config["DEBUG"]: + app.config["CACHE_TYPE"] = "NullCache" + logging.info(f"CACHE_TYPE was set to 'NullCache' in DEBUG mode.") register() cache.init_app(app)