Only use in-memory cache for database settings, set ttl=5 (#12166)

* Only use in-memory cache for database settings

Make necessary adjustments to monkeypatch
  as it is very vunerable to recursion
  Remove migration exception that is now redundant

Clear cache if a setting is changed

* Use dedicated middleware for setting cache stuff
  Clear cache for each request

* Add tests for in-memory cache
This commit is contained in:
Alan Rominger
2022-05-10 21:58:22 -04:00
committed by GitHub
parent f3725c714a
commit aaad634483
8 changed files with 61 additions and 6 deletions

View File

@@ -955,6 +955,7 @@ RECEPTOR_RELEASE_WORK = True
MIDDLEWARE = [
'django_guid.middleware.guid_middleware',
'awx.main.middleware.SettingsCacheMiddleware',
'awx.main.middleware.TimingMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'awx.main.middleware.MigrationRanCheckMiddleware',