def METHOD_NAME(viewid, layer, updated_nodes):
    cache_key = _cache_key("topology", viewid, layer)
    to_update = cache.get(cache_key)
    for node in updated_nodes:
        # If the node is new, it is easier just to make an early exit and
        # rebuild the whole topology
        if node["new_node"]:
            return invalidate_topology_cache(viewid, layer)
        # Otherwise, don't update nodes not cached in the topology
        if node["id"] not in to_update["nodes"]:
            continue
        diff = {"x": node["x"], "y": node["y"]}
        to_update["nodes"][node["id"]]["position"] = diff
    cache.set(cache_key, to_update, CACHE_TIMEOUT)