mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
clear all cache when lazy is not used #13544
This commit is contained in:
parent
506884bc4d
commit
88bf82be05
@ -69,10 +69,7 @@ class Command(BaseCommand):
|
||||
if not kwargs['lazy']:
|
||||
self.stdout.write('Clearing cached values... ', ending='')
|
||||
self.stdout.flush()
|
||||
content_types = [
|
||||
ContentType.objects.get_for_model(model) for model in indexers.keys()
|
||||
]
|
||||
deleted_count = search_backend.clear(content_types)
|
||||
deleted_count = search_backend.clear()
|
||||
self.stdout.write(f'{deleted_count} entries deleted.')
|
||||
|
||||
# Index models
|
||||
|
Loading…
Reference in New Issue
Block a user