def invalidate_zone_stack_cache(document, async=False):
 pks = ([document.pk] + [parent.pk for parent in document.get_topic_parents()])
 job = DocumentZoneStackJob()
 if async:
  invalidator = job.invalidate
 else:
  invalidator = job.refresh
 for pk in pks:
  invalidator(pk)

def invalidate_zone_stack_cache ( document , async = False ) : pks = ( [ document . pk ] + [ parent . pk for parent in document . get_topic_parents ( ) ] ) job = DocumentZoneStackJob ( ) if async : invalidator = job . invalidate else : invalidator = job . refresh for pk in pks : invalidator ( pk )
reset the cache for the zone stack for all of the documents in the document tree branch .