Add shared cache class and add mounted index cache invalidation when document and index instance nodes are updated or deleted.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
11
mayan/apps/mirroring/handlers.py
Normal file
11
mayan/apps/mirroring/handlers.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from .runtime import cache
|
||||
|
||||
|
||||
def handler_document_cache_delete(sender, **kwargs):
|
||||
cache.clear_document(document=kwargs['instance'])
|
||||
|
||||
|
||||
def handler_node_cache_delete(sender, **kwargs):
|
||||
cache.clear_node(node=kwargs['instance'])
|
||||
Reference in New Issue
Block a user