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:
Roberto Rosario
2018-10-08 02:22:05 -04:00
parent c715d0fc8e
commit 7ff974382b
11 changed files with 201 additions and 24 deletions

View 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'])