cache arrays for diff