'A signal handler to trigger cache invalidation for this zone.'

def on_zone_post_save(self, sender, instance, **kwargs):

    if instance.previous:
        if (instance.document.pk != instance.previous['document_id']):
            invalidate_nearest_zone_cache(instance.previous['document_id'])
            invalidate_zone_urls_cache(instance.previous['document__locale'])
        instance.previous = None
    invalidate_nearest_zone_cache(instance.document.pk)
    invalidate_zone_urls_cache(instance.document.locale)
