def METHOD_NAME(self, router: "Router"):
    for external_address in router._curr_external_addresses:
        try:
            self._curr_external_addresses.remove(external_address)
        except ValueError:
            pass
    for addr in router._local_mapping:
        self._local_mapping.pop(addr, None)
    for addr in router._mapping:
        self._mapping.pop(addr, None)
    self._cache_local = threading.local()