mirror of
https://github.com/netbox-community/netbox.git
synced 2025-09-06 14:23:36 -06:00
Merge 663f9a223d
into 5ca2cea016
This commit is contained in:
commit
a07eaf4382
@ -42,6 +42,13 @@ class CoreConfig(AppConfig):
|
|||||||
# Clear Redis cache on startup in development mode
|
# Clear Redis cache on startup in development mode
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
try:
|
try:
|
||||||
|
config = cache.get('config')
|
||||||
|
config_version = cache.get('config_version')
|
||||||
cache.clear()
|
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:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user