Example #1
0
def document_delete_listener(sender, **kwargs):
    user = kwargs.get('user')
    document = kwargs.get('document')
    from apps.rawdb.app_vars import APP_VAR_DISABLE_RAW_DB_CACHING
    if APP_VAR_DISABLE_RAW_DB_CACHING.val:
        return
    from apps.rawdb.field_value_tables import delete_document_from_cache
    delete_document_from_cache(user, document)
Example #2
0
 def document_delete_listener(obj: Document):
     from apps.rawdb.app_vars import APP_VAR_DISABLE_RAW_DB_CACHING
     if APP_VAR_DISABLE_RAW_DB_CACHING.val:
         return
     from apps.rawdb.field_value_tables import delete_document_from_cache
     delete_document_from_cache(obj.pk)