mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-25 18:08:38 -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']:
|
if not kwargs['lazy']:
|
||||||
self.stdout.write('Clearing cached values... ', ending='')
|
self.stdout.write('Clearing cached values... ', ending='')
|
||||||
self.stdout.flush()
|
self.stdout.flush()
|
||||||
content_types = [
|
deleted_count = search_backend.clear()
|
||||||
ContentType.objects.get_for_model(model) for model in indexers.keys()
|
|
||||||
]
|
|
||||||
deleted_count = search_backend.clear(content_types)
|
|
||||||
self.stdout.write(f'{deleted_count} entries deleted.')
|
self.stdout.write(f'{deleted_count} entries deleted.')
|
||||||
|
|
||||||
# Index models
|
# Index models
|
||||||
|
Loading…
Reference in New Issue
Block a user