ArchipelagoMW / Archipelago

Archipelago Multi-Game Randomizer and Server
https://archipelago.gg
Other
480 stars 636 forks source link

WebHost: Disable flask caching if `DEBUG` is enabled. #3581

Closed ThePhar closed 3 months ago

ThePhar commented 3 months ago

What is this fixing or adding?

This disables flask caching of templates when DEBUG is set to True in the webhost config file, which allows hotreloading of jinja templates without restarting the flask app.

How was this tested?

Ran webhost with DEBUG enabled and disabled and confirmed caching is disabled in DEBUG mode.

If this makes graphical changes, please attach screenshots.

N/A

black-sliver commented 3 months ago

My problem with this solution is that if you want to debug caching solutions, this is now impossible.

I would prefer adding documentation to the config example yaml to set CACHE_TYPE: NullCache over this solution.

ThePhar commented 3 months ago

Definitely fair. I think I'll just close this then.