fixing MachineCache:using two lists instead of a dictionary to avoid hashing the arrays every time