Merge "Fix per-request memoization"

This commit is contained in:
Zuul 2022-07-28 10:15:07 +00:00 committed by Gerrit Code Review
commit 360db16290
1 changed files with 4 additions and 0 deletions

View File

@ -83,6 +83,10 @@ class Application(flask.Flask):
# This is needed for WSGI since it cannot process argv
self.configure(config_file=os.environ.get('SUSHY_EMULATOR_CONFIG'))
@self.before_request
def reset_cache():
self._cache = {}
def configure(self, config_file=None, extra_config=None):
if config_file:
self.config.from_pyfile(config_file)