Properly update device's rack and dc on cache update