예제 #1
0
def purge_document_from_cache(instance, **kwargs):
    if not kwargs.get('created', False):
        base_url = get_base_url()
        purge_url_from_cache(base_url + reverse('tuiuiuapi_v2:documents:detail', args=(instance.id, )))
예제 #2
0
def purge_page_from_cache(instance, **kwargs):
    base_url = get_base_url()
    purge_url_from_cache(base_url + reverse('tuiuiuapi_v2:pages:detail', args=(instance.id, )))