mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 03:16:25 -06:00
Skip clearing cache when handling new objects
This commit is contained in:
parent
f6324d1a8c
commit
cc3ee78f17
@ -54,11 +54,11 @@ class SearchBackend:
|
|||||||
"""
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def caching_handler(self, sender, instance, **kwargs):
|
def caching_handler(self, sender, instance, created, **kwargs):
|
||||||
"""
|
"""
|
||||||
Receiver for the post_save signal, responsible for caching object creation/changes.
|
Receiver for the post_save signal, responsible for caching object creation/changes.
|
||||||
"""
|
"""
|
||||||
self.cache(instance)
|
self.cache(instance, remove_existing=not created)
|
||||||
|
|
||||||
def removal_handler(self, sender, instance, **kwargs):
|
def removal_handler(self, sender, instance, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user