mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 19:36:26 -06:00
Clear Swagger API cache on startup
This commit is contained in:
parent
8c9bb73ff7
commit
c8ecfa0b14
@ -1,4 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
from django.core.cache import cache
|
||||
from django.db import models
|
||||
from django.db.migrations.operations import AlterModelOptions
|
||||
|
||||
@ -22,3 +23,6 @@ class CoreConfig(AppConfig):
|
||||
|
||||
# Register models
|
||||
register_models(*self.get_models())
|
||||
|
||||
# Clear Swagger API cache on startup
|
||||
cache.delete("*api_schema_*")
|
||||
|
Loading…
Reference in New Issue
Block a user