def invalidate_zone_urls_cache(document, async=False):
 job = DocumentZoneURLRemapsJob()
 if async:
  invalidator = job.invalidate
 else:
  invalidator = job.refresh
 try:
  if document.zone:
   invalidator(document.locale)
 except ObjectDoesNotExist:
  pass

def invalidate_zone_urls_cache ( document , async = False ) : job = DocumentZoneURLRemapsJob ( ) if async : invalidator = job . invalidate else : invalidator = job . refresh try : if document . zone : invalidator ( document . locale ) except ObjectDoesNotExist : pass
reset the url remap list cache for the given document .