This commit is contained in:
Daniel Sheppard 2025-09-05 22:33:26 +00:00 committed by GitHub
commit a07eaf4382
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,6 +42,13 @@ class CoreConfig(AppConfig):
# Clear Redis cache on startup in development mode
if settings.DEBUG:
try:
config = cache.get('config')
config_version = cache.get('config_version')
cache.clear()
if config_version:
# Activate the current config revision
# Do not query DB due to apps still initializing
cache.set('config', config, None)
cache.set('config_version', config_version, None)
except Exception:
pass