Update the internal global cache when a swap happens