Skip to content

Commit

Permalink
WebHost: Disable flask caching if DEBUG is enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePhar committed Jun 23, 2024
1 parent 40c9dfd commit fdb671a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions WebHost.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fdb671a

Please sign in to comment.